Invoking Methods

Microagent methods are invoked using the invoke() method of the AgentManager. This method takes a MicroAgentID and a MethodInvocation object. The MicroAgentID may be obtained as described in Microagent Descriptors. The MethodInvocation can be constructed using the data provided in the microagent descriptor.

Method invocations return an instance of the MicroAgentData class, which acts as a container for transmitting invocation results. MicroAgentData objects contain source and data attributes. The source attribute is a MicroAgentID object identifying the source of the data. The data attribute contains the actual method invocation results.