HOME

com.ireasoning.core.jmx
Class BaseAgent

java.lang.Object
  extended bycom.ireasoning.core.jmx.BaseAgent
Direct Known Subclasses:
SnmpBaseAgent

public class BaseAgent
extends Object

Base class for agent implementations


Field Summary
protected  MBeanServer _mbeanServer
          MBeanServer instance, which is to be used to create/register MBeans
 
Constructor Summary
BaseAgent()
          Constructor.
BaseAgent(MBeanServer server)
          Constructor
 
Method Summary
 MBeanServer getMBeanServer()
          Returns MBeanServer object
protected  void registerHelperMBeans()
          Register config and logger MBeans
protected  void startAdaptorServer(AdaptorServerMBean s, String adaptorName, int port)
          Starts adaptor server
protected  void startAdaptorServer(AdaptorServerMBean s, String adaptorName, int port, InetAddress laddr)
          Starts adaptor server
protected  void stopAdaptorServer(String adaptorName, int port)
          Stops adaptor server
protected  void stopAdaptorServer(String adaptorName, int port, InetAddress address)
          Stops adaptor server
protected  void unregisterHelperMBeans()
          Unregister config and logger MBeans
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_mbeanServer

protected MBeanServer _mbeanServer
MBeanServer instance, which is to be used to create/register MBeans

Constructor Detail

BaseAgent

public BaseAgent()
Constructor. A MBeanServer instance will be created to create/register MBeans.


BaseAgent

public BaseAgent(MBeanServer server)
Constructor

Parameters:
server - the MBeanServer object which is to be used to create/register MBeans
Method Detail

registerHelperMBeans

protected void registerHelperMBeans()
Register config and logger MBeans


unregisterHelperMBeans

protected void unregisterHelperMBeans()
Unregister config and logger MBeans


startAdaptorServer

protected void startAdaptorServer(AdaptorServerMBean s,
                                  String adaptorName,
                                  int port)
                           throws Exception
Starts adaptor server

Parameters:
s - AdaptorServerMBean instance
adaptorName - adaptor server's name
port - adaptor server's listening port
Throws:
Exception

startAdaptorServer

protected void startAdaptorServer(AdaptorServerMBean s,
                                  String adaptorName,
                                  int port,
                                  InetAddress laddr)
                           throws Exception
Starts adaptor server

Parameters:
s - AdaptorServerMBean instance
adaptorName - adaptor server's name
port - adaptor server's listening port
laddr - local address to bind
Throws:
Exception

stopAdaptorServer

protected void stopAdaptorServer(String adaptorName,
                                 int port)
                          throws Exception
Stops adaptor server

Parameters:
adaptorName - adaptor server's name
port - adaptor server's listening port
Throws:
Exception

stopAdaptorServer

protected void stopAdaptorServer(String adaptorName,
                                 int port,
                                 InetAddress address)
                          throws Exception
Stops adaptor server

Parameters:
adaptorName - adaptor server's name
port - adaptor server's listening port
Throws:
Exception

getMBeanServer

public MBeanServer getMBeanServer()
                           throws Exception
Returns MBeanServer object

Throws:
Exception

HOME

Copyright © 2002 iReasoning Inc. All Rights Reserved.