use of com.jme3.network.Client in project jmonkeyengine by jMonkeyEngine.
the class RpcClientService method terminate.
/**
* Used internally to unregister the RPC MessageDelegator that
* was previously added to the network Client.
*/
@Override
public void terminate(ClientServiceManager serviceManager) {
Client client = serviceManager.getClient();
client.removeMessageListener(delegator, delegator.getMessageTypes());
}
use of com.jme3.network.Client in project jmonkeyengine by jMonkeyEngine.
the class RpcClientService method onInitialize.
/**
* Used internally to setup the RpcConnection and MessageDelegator.
*/
@Override
protected void onInitialize(ClientServiceManager serviceManager) {
Client client = serviceManager.getClient();
this.rpc = new RpcConnection(client);
delegator = new ObjectMessageDelegator(rpc, true);
client.addMessageListener(delegator, delegator.getMessageTypes());
}
use of com.jme3.network.Client in project jmonkeyengine by jMonkeyEngine.
the class ClientSerializerRegistrationsService method messageReceived.
@Override
public void messageReceived(Client source, Message m) {
// We only wait for one kind of message...
SerializerRegistrationsMessage msg = (SerializerRegistrationsMessage) m;
msg.registerAll();
}
Aggregations