|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apfloat.samples.RemoteOperationExecutor
Class to call an OperationServer
to execute Operation
s remotely.
Constructor Summary | |
RemoteOperationExecutor(java.lang.String host,
int port)
Create a new client that will connect to the server running at the specified host and port. |
Method Summary | |
java.lang.Object |
execute(Operation operation)
Execute an operation remotely. |
BackgroundOperation |
executeBackground(Operation operation)
Execute an operation remotely. |
java.lang.String |
getHost()
Returns the host name. |
int |
getPort()
Returns the host port. |
int |
getWeight()
Returns the relative weight of this executor. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RemoteOperationExecutor(java.lang.String host, int port)
host
- Hostname of the remote server.port
- Port of the remote server.Method Detail |
public java.lang.Object execute(Operation operation)
execute
in interface OperationExecutor
operation
- The operation to execute remotely.
java.lang.RuntimeException
- In case of network error or if the return value class is unknown.public BackgroundOperation executeBackground(Operation operation)
executeBackground
in interface OperationExecutor
operation
- The operation to execute remotely.
BackgroundOperation
for retrieving the result of the operation later.public int getWeight()
OperationExecutor
getWeight
in interface OperationExecutor
public java.lang.String getHost()
public int getPort()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |