Package com.jme3.network.service.rpc
Class RpcConnection
java.lang.Object
com.jme3.network.service.rpc.RpcConnection
Wraps a message connection to provide RPC call support.  This
  is used internally by the RpcClientService and RpcHostedService to manage
  network messaging.
- 
Constructor SummaryConstructorsConstructorDescriptionRpcConnection(MessageConnection connection) Creates a new RpcConnection for the specified network connection.
- 
Method SummaryModifier and TypeMethodDescriptioncallAndWait(byte channel, short objId, short procId, Object... args) Performs a remote procedure call with the specified arguments and waits for the response.voidPerforms a remote procedure call with the specified arguments but does not wait for a response.voidclose()Clears any pending synchronous calls causing them to throw an exception with the message "Closing connection".voidCalled internally when an RpcCallMessage is received from the remote connection.voidCalled internally when an RpcResponseMessage is received from the remote connection.voidregisterHandler(short objId, RpcHandler handler) Register a handler that can be called by the other end of the connection using the specified object ID.voidremoveHandler(short objId, RpcHandler handler) Removes a previously registered handler for the specified object ID.protected voidsend(byte channel, RpcResponseMessage msg) 
- 
Constructor Details- 
RpcConnectionCreates a new RpcConnection for the specified network connection.
 
- 
- 
Method Details- 
closepublic void close()Clears any pending synchronous calls causing them to throw an exception with the message "Closing connection".
- 
callAndWaitPerforms a remote procedure call with the specified arguments and waits for the response. Both the outbound message and inbound response will be sent on the specified channel.
- 
callAsyncPerforms a remote procedure call with the specified arguments but does not wait for a response. The outbound message is sent on the specified channel. There is no inbound response message.
- 
registerHandlerRegister a handler that can be called by the other end of the connection using the specified object ID. 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.
- 
send
- 
handleMessageCalled internally when an RpcCallMessage is received from the remote connection.
- 
handleMessageCalled internally when an RpcResponseMessage is received from the remote connection.
 
-