All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----examples.agentbean.AgentMain
AgentMain class provides a sample agent designed to
be put in a jar file and then loaded into the BeanBox application.
This agent will be able to serve every bean instantiated in the BeanBox which contain the following registration lines in their constructor:
try{
((Framework)AgentMain.getFramework()).addObject((Object)this, new ObjectName(((Framework)AgentMain.getFramework()).getDomain()+":examples.agentbean.TextSample"));
} catch (Exception e) {
e.printStackTrace();
}
An example of a such bean is provided in TextSample.java source file.
The AgentMain must be the first element added in the BeanBox. Then, the other elements
can register themself to the AgentMain.
In addition, the agent starts these managed object adaptor servers:
To manage the agent through a Web browser, point the Web browser at
http://hostname
:8082.
main method does not allow you to specify command-line
parameters.
public AgentMain()
public static void main(String args[])
main method does not allow you to specify command-line
parameters. However, it does allow you to specify the trace level
by using the DEBUG properties.
For more information on trace levels, refer to
Debug object.
public static Framework getFramework()
All Packages Class Hierarchy This Package Previous Next Index