kaos.core.util
Class MethodCallRequestHandler
java.lang.Object
kaos.core.util.MethodCallRequestHandler
- Direct Known Subclasses:
- ActionMethodRequestHandler, DSCoordinatorImpl, ExecutionManager, KAoSGuardImpl, KAoSRobot, SpatialDB
public abstract class MethodCallRequestHandler
- extends java.lang.Object
Extending this class allows your methods to be called remotely by other entities who send you a MethodCallRequestMsg. This class takes care of binding to the
message transport system, receiving MethodCallRequestMsgs, parsing them, calling the appropriate method on the superclass, and sending the reply as a MethodCallResultMsg
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_NICKNAME
protected java.lang.String DEFAULT_NICKNAME
myLocator
public Locator myLocator
myMessageReceiver
public MessageReceiver myMessageReceiver
myMessageSender
public MessageSender myMessageSender
_helper
protected MethodCallRequestHelper _helper
_nickName
public java.lang.String _nickName
_mts
protected MessageTransportService _mts
_agentDescription
protected KAoSAgentDescription _agentDescription
_logger
protected Logger _logger
MethodCallRequestHandler
public MethodCallRequestHandler()
initialize
public Locator initialize(MessageTransportService mts,
JasBean entityEnv)
throws java.lang.Exception
- This method initializes the MethodCallRequestHandler to receive messages from remote entities, using the entityEnv to obtain its local locator. Note that the entityEnv should
also contain the agent's nickname, if there is one, as the value of the key KAoSConstants.NAME
- Throws:
java.lang.Exception
bindToTransport
public void bindToTransport(KAoSAgentDescription desc)
throws java.lang.Exception
- Throws:
java.lang.Exception
receiveMessage
public void receiveMessage(TransportMessage msg)
handleMsgContent
protected void handleMsgContent(Msg aMsg)
handleObjContent
protected void handleObjContent(java.lang.Object obj)