Build a new remote session and initialize it.
@return The remote Task.
341080
public RemoteTask createRemoteTask(Map<String, Object> properties) throws RemoteException
    {
        Utility.getLogger().info("createRemoteTask()");
        RemoteTask remoteTask = this.getNewRemoteTask(properties);
        return remoteTask;
    }
22489
@Override
    public Session createSession() throws JMSException {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "createSession");

        Session session = null;
        try {
            session = createSession(false, Session.AUTO_ACKNOWLEDGE);
        } finally {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(this, tc, "createSession");
        }

        return session;
    }
1041425
def create_remote(self, name, url, **kwargs):
        """"""
        return Remote.create(self, name, url, **kwargs)
613062
public Task addHost_Task(HostConnectSpec spec, boolean asConnected, ResourcePool resourcePool) throws InvalidLogin, HostConnectFault, RuntimeFault, RemoteException {
        return addHost_Task(spec, asConnected, resourcePool, null);
    }
1001318
public <TContinuationResult> Task<TContinuationResult> onSuccessTask(
      final Continuation<TResult, Task<TContinuationResult>> continuation, Executor executor) {
    return onSuccessTask(continuation, executor, null);
  }
918237
protected T build() {
        final T instance;
        try {
            instance = build(connection(), maxContentLength(),
                                     isValidateHttpHeaders(), isPropagateSettings());
        } catch (Throwable t) {
            throw new IllegalStateException("failed to create a new InboundHttp2ToHttpAdapter", t);
        }
        connection.addListener(instance);
        return instance;
    }
393835
public Task getTask()
    {
        Task task = super.getTask();
        if (task == null)
            task = m_taskFake;
        if (task == null)
            task = m_taskFake = new FakeTask(new FakeApplication(null, null, null), null, null);
        return task;
    }
449663
public Task addStandaloneHost_Task(HostConnectSpec spec, ComputeResourceConfigSpec compResSpec, boolean addConnected) throws InvalidLogin, HostConnectFault, RuntimeFault, RemoteException {
        return addStandaloneHost_Task(spec, compResSpec, addConnected, null);
    }
64276
public RemoteMenuController build() throws IOException {
        if(protocol == null) {
            protocol = new TagValMenuCommandProtocol();
        }
        if(executorService == null) {
            executorService = Executors.newScheduledThreadPool(2,
                    new NamedDaemonThreadFactory("remote-socket"));
        }
        SocketBasedConnector connector = new SocketBasedConnector(executorService, protocol, address, port);
        return new RemoteMenuController(connector, menuTree, executorService, name, clock);
    }
1121294
@Override
	protected final void remoteInit() throws JMSException
    {
        CreateDurableSubscriberQuery query = new CreateDurableSubscriberQuery();
        query.setSessionId(session.getId());
        query.setConsumerId(id);
        query.setTopic((Topic)destination);
        query.setMessageSelector(messageSelector);
        query.setNoLocal(noLocal);
        query.setName(subscriptionName);
        transportEndpoint.blockingRequest(query);
    }
750118
private SMPPSession getSession() throws IOException {
    if (session == null) {
      LOGGER.info("Initiate session for the first time to {}:{}", remoteIpAddress, remotePort);
      session = newSession();
    }
    else if (!session.getSessionState().isBound()) {
      throw new IOException("We have no valid session yet");
    }
    return session;
  }
1049566
@Override
	public final Session createSession(boolean transacted, int acknowledgeMode) throws JMSException
    {
        if (!transacted && acknowledgeMode == Session.SESSION_TRANSACTED)
            throw new FFMQException("Acknowledge mode SESSION_TRANSACTED cannot be used for an non-transacted session","INVALID_ACK_MODE");
        
        externalAccessLock.readLock().lock();
    	try
		{
	        checkNotClosed();
	        RemoteSession session = new RemoteSession(idProvider.createID(),
	        		                                  this,
	                                                  transportHub.createEndpoint(),
	                                                  transacted,
	                                                  acknowledgeMode);
	        registerSession(session);
	        session.remoteInit();
	        return session;
		}
    	finally
    	{
    		externalAccessLock.readLock().unlock();
    	}
    }
1338224
public static RemoteSessionServer startupServer(Map<String,Object> properties)
    {
    	RemoteSessionServer remoteServer = null;
        Utility.getLogger().info("Starting RemoteSession server");

        try {
            remoteServer = new RemoteSessionServer(null, null, null);
        } catch (RemoteException ex)    {
            ex.printStackTrace();
        }

        return remoteServer;
    }
540215
public void init(RemoteTask server, BaseMessageQueue baseMessageQueue)
        throws RemoteException
    {
        super.init(baseMessageQueue);
        m_sendQueue = server.createRemoteSendQueue(baseMessageQueue.getQueueName(), baseMessageQueue.getQueueType());
    }
226133
protected void remoteInit() throws JMSException
    {
        CreateConsumerQuery query = new CreateConsumerQuery();
        query.setConsumerId(id);
        query.setSessionId(session.getId());
        query.setDestination(destination);
        query.setMessageSelector(messageSelector);
        query.setNoLocal(noLocal);
        transportEndpoint.blockingRequest(query);        
    }
104901
public RemoteSession makeRemoteSession(RemoteSession parentSessionObject, String strSessionClass)
    {
        RemoteTask server = (RemoteTask)this.getRemoteTask();
        try   {
            synchronized (server)
            {   // In case this is called from another task
                if (parentSessionObject == null)
                    return (RemoteSession)server.makeRemoteSession(strSessionClass);
                else
                    return (RemoteSession)parentSessionObject.makeRemoteSession(strSessionClass);
            }
        } catch (RemoteException ex)    {
            ex.printStackTrace();
        } catch (Exception ex)  {
            ex.printStackTrace();
        }
        return null;
    }
233603
public BoxFutureTask<BoxSession> refresh() {
        if (mRefreshTask != null && mRefreshTask.get() != null){
            BoxFutureTask<BoxSession> lastRefreshTask = mRefreshTask.get();
            if (!(lastRefreshTask.isCancelled() || lastRefreshTask.isDone())){
                return lastRefreshTask;
            }
        }
        final BoxFutureTask<BoxSession> task = (new BoxSessionRefreshRequest(this)).toTask();
        new Thread(){
            @Override
            public void run() {
                task.run();
            }
        }.start();
        mRefreshTask = new WeakReference<BoxFutureTask<BoxSession>>(task);
        return task;
    }