public class RpcClientService extends AbstractClientService
Constructor and Description |
---|
RpcClientService()
Creates a new RpcClientService that can be registered
with the network Client object.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
callAndWait(byte channel,
short objId,
short procId,
java.lang.Object... args)
Performs a synchronous call on the server against the specified
object using the specified procedure ID.
|
void |
callAsync(byte channel,
short objId,
short procId,
java.lang.Object... args)
Performs an asynchronous call on the server against the specified
object using the specified procedure ID.
|
RpcConnection |
getRpcConnection()
Returns the underlying RPC connection for use by other
services that may require a more generic non-client/server
specific RPC object with which to interact.
|
protected void |
onInitialize(ClientServiceManager serviceManager)
Used internally to set up the RpcConnection and MessageDelegator.
|
void |
registerHandler(short objId,
RpcHandler handler)
Register a handler that will be called when the server
performs a remove procedure call against this client.
|
void |
removeHandler(short objId,
RpcHandler handler)
Removes a previously registered handler for the specified
object ID.
|
void |
terminate(ClientServiceManager serviceManager)
Used internally to unregister the RPC MessageDelegator that
was previously added to the network Client.
|
getClient
getService, getServiceManager, initialize, start, stop, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
initialize, start, stop
public RpcClientService()
public RpcConnection getRpcConnection()
protected void onInitialize(ClientServiceManager serviceManager)
onInitialize
in class AbstractService<ClientServiceManager>
public void terminate(ClientServiceManager serviceManager)
terminate
in interface ClientService
terminate
in interface Service<ClientServiceManager>
terminate
in class AbstractService<ClientServiceManager>
public java.lang.Object callAndWait(byte channel, short objId, short procId, java.lang.Object... args)
public void callAsync(byte channel, short objId, short procId, java.lang.Object... args)
public void registerHandler(short objId, RpcHandler handler)
public void removeHandler(short objId, RpcHandler handler)