Package com.jme3.network.util
Class ObjectMessageDelegator<S extends MessageConnection>
java.lang.Object
com.jme3.network.util.AbstractMessageDelegator<S>
com.jme3.network.util.ObjectMessageDelegator<S>
- All Implemented Interfaces:
MessageListener<S>
public class ObjectMessageDelegator<S extends MessageConnection>
extends AbstractMessageDelegator<S>
A MessageListener implementation that will forward messages to methods
of a specified delegate object. These methods can be automapped or manually
specified.
-
Constructor Summary
ConstructorDescriptionObjectMessageDelegator
(Object delegate, boolean automap) Creates a MessageListener that will forward mapped message types to methods of the specified object. -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
getSourceDelegate
(MessageConnection source) Implemented by subclasses to provide the actual delegate object against which the mapped message type methods will be called.Methods inherited from class com.jme3.network.util.AbstractMessageDelegator
allowName, automap, findDelegate, getMessageType, getMessageTypes, getMethod, isValidMethod, map, map, map, messageReceived
-
Constructor Details
-
ObjectMessageDelegator
Creates a MessageListener that will forward mapped message types to methods of the specified object. If automap is true then all methods with the proper signature will be mapped.Methods of the following signatures are allowed:
- void someName(S conn, SomeMessage msg)
- void someName(Message msg)
-
-
Method Details
-
getSourceDelegate
Description copied from class:AbstractMessageDelegator
Implemented by subclasses to provide the actual delegate object against which the mapped message type methods will be called.- Specified by:
getSourceDelegate
in classAbstractMessageDelegator<S extends MessageConnection>
-