Package com.jme3.network.service.rpc
Class RpcClientService
java.lang.Object
com.jme3.network.service.AbstractService<ClientServiceManager>
com.jme3.network.service.AbstractClientService
com.jme3.network.service.rpc.RpcClientService
- All Implemented Interfaces:
- ClientService,- Service<ClientServiceManager>
RPC service that can be added to a network Client to
  add RPC send/receive capabilities.  Remote procedure
  calls can be made to the server and responses retrieved.
  Any remote procedure calls that the server performs for
  this connection will be received by this service and delegated
  to the appropriate RpcHandlers.
- 
Constructor SummaryConstructorsConstructorDescriptionCreates a new RpcClientService that can be registered with the network Client object.
- 
Method SummaryModifier and TypeMethodDescriptioncallAndWait(byte channel, short objId, short procId, Object... args) Performs a synchronous call on the server against the specified object using the specified procedure ID.voidPerforms an asynchronous call on the server against the specified object using the specified procedure ID.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 voidonInitialize(ClientServiceManager serviceManager) Used internally to set up the RpcConnection and MessageDelegator.voidregisterHandler(short objId, RpcHandler handler) Register a handler that will be called when the server performs a remove procedure call against this client.voidremoveHandler(short objId, RpcHandler handler) Removes a previously registered handler for the specified object ID.voidterminate(ClientServiceManager serviceManager) Used internally to unregister the RPC MessageDelegator that was previously added to the network Client.Methods inherited from class com.jme3.network.service.AbstractClientServicegetClientMethods inherited from class com.jme3.network.service.AbstractServicegetService, getServiceManager, initialize, start, stop, toStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.jme3.network.service.ClientServiceinitialize, start, stop
- 
Constructor Details- 
RpcClientServicepublic RpcClientService()Creates a new RpcClientService that can be registered with the network Client object.
 
- 
- 
Method Details- 
getRpcConnectionReturns 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.
- 
onInitializeUsed internally to set up the RpcConnection and MessageDelegator.- Specified by:
- onInitializein class- AbstractService<ClientServiceManager>
 
- 
terminateUsed internally to unregister the RPC MessageDelegator that was previously added to the network Client.- Specified by:
- terminatein interface- ClientService
- Specified by:
- terminatein interface- Service<ClientServiceManager>
- Overrides:
- terminatein class- AbstractService<ClientServiceManager>
 
- 
callAndWaitPerforms a synchronous call on the server against the specified object using the specified procedure ID. Both inbound and outbound communication is done on the specified channel.
- 
callAsyncPerforms an asynchronous call on the server against the specified object using the specified procedure ID. Communication is done over the specified channel. No responses are received and none are waited for.
- 
registerHandlerRegister a handler that will be called when the server performs a remove procedure call against this client. Only one handler per object ID can be registered at any given time, though the same handler can be registered for multiple object IDs.
- 
removeHandlerRemoves a previously registered handler for the specified object ID.
 
-