Microagent Descriptors
Descriptors are represented by the MicroAgentDescriptor
class. They are obtained by invoking the describe()
method of the AgentManager
class. A MicroAgentDescriptor
fully describes a microagent. It contains a list of MethodDescriptor
objects that describe each available method and all that is needed to invoke them.
The methods of a microagent are divided into three categories depending on their impact. These categories are enumerated by the following static variables of the MethodDescriptor
class:
|
•
|
IMPACT_ACTION : Methods of type IMPACT_ACTION take some action that can potentially change the state of the managed object represented by the microagent. |
|
•
|
IMPACT_INFO : Methods of type IMPACT_INFO simply retrieve some information in a manner that does not change the state of the managed object. |
|
•
|
IMPACT_ACTION_INFO : Methods of type IMPACT_ACTION_INFO return data but may also change the sate of the managed object. |
The describe()
method of the AgentManager
requires an argument of type MicroAgentID
. There are two general ways to obtain MicroAgentID
objects:
|
•
|
If your application is also performing monitoring then the MicroAgentID s for microagents loaded on a particular agent can be obtained from the method AgentInstance.getStatusMicroAgents() . A registered MicroAgentListMonitor object also receives MicroAgentID s in the events delivered to it. |
|
•
|
The method AgentManager.getMicroAgentID() can also be used to obtain MicroAgentID objects. It takes a microagent name as its argument and returns an array of all microagents of that name that are currently loaded on all agents the console can communicate with. This method blocks for a period of time while it queries the agents on the network. A second version of this method accepts an integer that indicates the minimum number of desired microagent ids in the return. This method generally returns more quickly than the first version if the minimum number specified is less than or equal to the actual number of matching microagents on the network. |