|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.mobilityrpc.session.impl.MobilitySessionImpl
public class MobilitySessionImpl
| Constructor Summary | |
|---|---|
MobilitySessionImpl(UUID sessionId,
MobilityControllerInternal mobilityController)
|
|
| Method Summary | ||
|---|---|---|
|
execute(ConnectionId connectionId,
Callable<T> callable)
Transfers the given Callable object, and any objects it references, to the given remote machine,
and executes it (calls the Callable.call() method) on the remote machine. |
|
|
execute(ConnectionId connectionId,
ExecutionMode executionMode,
Callable<T> callable)
Transfers the given Callable object, and any objects it references, to the given remote machine,
and executes it (calls the Callable.call() method) on the remote machine. |
|
|
execute(ConnectionId connectionId,
ExecutionMode executionMode,
long executionResponseTimeoutMs,
Callable<T> callable)
Transfers the given Callable object, and any objects it references, to the given remote machine,
and executes it (calls the Callable.call() method) on the remote machine. |
|
void |
execute(ConnectionId connectionId,
ExecutionMode executionMode,
long executionResponseTimeoutMs,
Runnable runnable)
Transfers the given Runnable object, and any objects it references, to the given remote machine,
and executes it (calls the Runnable.run() method) on the remote machine. |
|
void |
execute(ConnectionId connectionId,
ExecutionMode executionMode,
Runnable runnable)
Transfers the given Runnable object, and any objects it references, to the given remote machine,
and executes it (calls the Runnable.run() method) on the remote machine. |
|
void |
execute(ConnectionId connectionId,
Runnable runnable)
Transfers the given Runnable object, and any objects it references, to the given remote machine,
and executes it (calls the Runnable.run() method) on the remote machine. |
|
|
execute(String address,
Callable<T> callable)
Transfers the given Callable object, and any objects it references, to the given remote machine,
and executes it (calls the Callable.call() method) on the remote machine. |
|
|
execute(String address,
long executionResponseTimeoutMs,
Callable<T> callable)
Transfers the given Callable object, and any objects it references, to the given remote machine,
and executes it (calls the Callable.call() method) on the remote machine. |
|
void |
execute(String address,
long executionResponseTimeoutMs,
Runnable runnable)
Transfers the given Runnable object, and any objects it references, to the given remote machine,
and executes it (calls the Runnable.run() method) on the remote machine. |
|
void |
execute(String address,
Runnable runnable)
Transfers the given Runnable object, and any objects it references, to the given remote machine,
and executes it (calls the Runnable.run() method) on the remote machine. |
|
MobilityController |
getMobilityController()
Returns the mobility controller which manages this session. |
|
SessionClassLoader |
getSessionClassLoader()
Returns the class loader associated with this session. |
|
UUID |
getSessionId()
Returns the UUID of this session. |
|
void |
receiveExecutionResponse(ExecutionResponse executionResponse)
Called when we receive an incoming ExecutionResponse object from a remote machine addressed to this
session. |
|
void |
receiveIncomingExecutionRequest(ConnectionId connectionId,
ExecutionRequest executionRequest)
Called when we receive an incoming ExecutionRequest object from a remote machine addressed to this
session. |
|
void |
release()
Removes this session from the mobility controller. |
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MobilitySessionImpl(UUID sessionId,
MobilityControllerInternal mobilityController)
| Method Detail |
|---|
public UUID getSessionId()
MobilitySession
getSessionId in interface MobilitySession
public void execute(String address,
Runnable runnable)
MobilitySessionRunnable object, and any objects it references, to the given remote machine,
and executes it (calls the Runnable.run() method) on the remote machine.
This is a convenience method for calling MobilitySession.execute(ConnectionId, ExecutionMode, Runnable)
with ExecutionMode.RETURN_RESPONSE and default port 5739 in the connection id.
execute in interface MobilitySessionaddress - The address (ip or name) of the remote machinerunnable - The object to send and execute on the remote machine
public void execute(String address,
long executionResponseTimeoutMs,
Runnable runnable)
MobilitySessionRunnable object, and any objects it references, to the given remote machine,
and executes it (calls the Runnable.run() method) on the remote machine.
This is a convenience method for calling MobilitySession.execute(ConnectionId, ExecutionMode, long, Runnable)
with ExecutionMode.RETURN_RESPONSE and default port 5739 in the connection id.
execute in interface MobilitySessionaddress - The address (ip or name) of the remote machineexecutionResponseTimeoutMs - The timeout in milliseconds to wait for a responserunnable - The object to send and execute on the remote machine
public void execute(ConnectionId connectionId,
Runnable runnable)
MobilitySessionRunnable object, and any objects it references, to the given remote machine,
and executes it (calls the Runnable.run() method) on the remote machine.
This is a convenience method for calling MobilitySession.execute(ConnectionId, ExecutionMode, Runnable)
with ExecutionMode.RETURN_RESPONSE.
execute in interface MobilitySessionconnectionId - The address/port of the remote machinerunnable - The object to send and execute on the remote machine
public void execute(ConnectionId connectionId,
ExecutionMode executionMode,
Runnable runnable)
MobilitySessionRunnable object, and any objects it references, to the given remote machine,
and executes it (calls the Runnable.run() method) on the remote machine.
execute in interface MobilitySessionconnectionId - The address/port of the remote machineexecutionMode - Either of the following, see: ExecutionMode.RETURN_RESPONSE or
ExecutionMode.FIRE_AND_FORGETrunnable - The object to send to the remote machine
public void execute(ConnectionId connectionId,
ExecutionMode executionMode,
long executionResponseTimeoutMs,
Runnable runnable)
MobilitySessionRunnable object, and any objects it references, to the given remote machine,
and executes it (calls the Runnable.run() method) on the remote machine.
execute in interface MobilitySessionconnectionId - The address/port of the remote machineexecutionMode - Either of the following, see: ExecutionMode.RETURN_RESPONSE or
ExecutionMode.FIRE_AND_FORGETexecutionResponseTimeoutMs - The timeout in milliseconds to wait for a response, which is applied unless
executionMode ExecutionMode.FIRE_AND_FORGET was specifiedrunnable - The object to send to the remote machine
public <T> T execute(String address,
Callable<T> callable)
MobilitySessionCallable object, and any objects it references, to the given remote machine,
and executes it (calls the Callable.call() method) on the remote machine. Transfers the object returned
by the call method on the remote machine, and any objects it references, back to the local
application.
This is a convenience method for calling MobilitySession.execute(ConnectionId, ExecutionMode, Callable)
with ExecutionMode.RETURN_RESPONSE and default port 5739 in the connection id.
execute in interface MobilitySessionaddress - The address (ip or name) of the remote machinecallable - The object to send to the remote machine
Callable.call() method on the remote machine (transferred back to
this machine)
public <T> T execute(String address,
long executionResponseTimeoutMs,
Callable<T> callable)
MobilitySessionCallable object, and any objects it references, to the given remote machine,
and executes it (calls the Callable.call() method) on the remote machine. Transfers the object returned
by the call method on the remote machine, and any objects it references, back to the local
application.
This is a convenience method for calling MobilitySession.execute(ConnectionId, ExecutionMode, long, Callable)
with ExecutionMode.RETURN_RESPONSE and default port 5739 in the connection id.
execute in interface MobilitySessionaddress - The address (ip or name) of the remote machineexecutionResponseTimeoutMs - The timeout in milliseconds to wait for a responsecallable - The object to send to the remote machine
Callable.call() method on the remote machine (transferred back to
this machine)
public <T> T execute(ConnectionId connectionId,
Callable<T> callable)
MobilitySessionCallable object, and any objects it references, to the given remote machine,
and executes it (calls the Callable.call() method) on the remote machine. Transfers the object returned
by the call method on the remote machine, and any objects it references, back to the local
application.
This is a convenience method for calling MobilitySession.execute(ConnectionId, ExecutionMode, Callable)
with ExecutionMode.RETURN_RESPONSE.
execute in interface MobilitySessionconnectionId - The address/port of the remote machinecallable - The object to send to the remote machine
Callable.call() method on the remote machine (transferred back to
this machine)
public <T> T execute(ConnectionId connectionId,
ExecutionMode executionMode,
Callable<T> callable)
MobilitySessionCallable object, and any objects it references, to the given remote machine,
and executes it (calls the Callable.call() method) on the remote machine. Transfers the object returned
by the call method on the remote machine, and any objects it references, back to the local
application.
execute in interface MobilitySessionconnectionId - The address/port of the remote machineexecutionMode - Either of the following, see: ExecutionMode.RETURN_RESPONSE or
ExecutionMode.FIRE_AND_FORGETcallable - The object to send to the remote machine
Callable.call() method on the remote machine (transferred back to
this machine)
public <T> T execute(ConnectionId connectionId,
ExecutionMode executionMode,
long executionResponseTimeoutMs,
Callable<T> callable)
MobilitySessionCallable object, and any objects it references, to the given remote machine,
and executes it (calls the Callable.call() method) on the remote machine. Transfers the object returned
by the call method on the remote machine, and any objects it references, back to the local
application.
execute in interface MobilitySessionconnectionId - The address/port of the remote machineexecutionMode - Either of the following, see: ExecutionMode.RETURN_RESPONSE or
ExecutionMode.FIRE_AND_FORGETexecutionResponseTimeoutMs - The timeout in milliseconds to wait for a response, which is applied unless
executionMode ExecutionMode.FIRE_AND_FORGET was specifiedcallable - The object to send to the remote machine
Callable.call() method on the remote machine (transferred back to
this machine)
public void receiveIncomingExecutionRequest(ConnectionId connectionId,
ExecutionRequest executionRequest)
MobilitySessionInternalExecutionRequest object from a remote machine addressed to this
session.
This method will submit this request to the session's thread pool for execution asynchronously. This method
will return immediately.
receiveIncomingExecutionRequest in interface MobilitySessionInternalconnectionId - Indicates the connection from which we received the requestexecutionRequest - A request from a remote machine to execute a serialized object on this machinepublic void receiveExecutionResponse(ExecutionResponse executionResponse)
MobilitySessionInternalExecutionResponse object from a remote machine addressed to this
session.
This method will look up and unblock the relevant thread which is waiting for the response to arrive.
receiveExecutionResponse in interface MobilitySessionInternalexecutionResponse - A response from a remote machine for an execution request sent by a thread on this
machinepublic SessionClassLoader getSessionClassLoader()
MobilitySession
getSessionClassLoader in interface MobilitySessionpublic MobilityController getMobilityController()
MobilitySession
getMobilityController in interface MobilitySessionpublic void release()
MobilitySessionMobilityController.releaseSession(java.util.UUID),
which bypasses this safeguard, and allows sessions to be released immediately.
release in interface MobilitySessionpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||