org.apache.avalon.phoenix.components.manager
Class AbstractJMXManager
org.apache.avalon.phoenix.components.manager.AbstractSystemManager
|
+--org.apache.avalon.phoenix.components.manager.AbstractJMXManager
- All Implemented Interfaces:
- SystemManager
- public abstract class AbstractJMXManager
- extends AbstractSystemManager
An abstract class via which JMX Managers can extend.
- Version:
- $Revision: 1.5 $ $Date: 2002/08/06 11:57:40 $
- Author:
- Peter Donald, Huw Roberts
Fields inherited from interface org.apache.avalon.phoenix.interfaces.SystemManager |
ROLE |
AbstractJMXManager
public AbstractJMXManager()
initialize
public void initialize()
throws Exception
- Overrides:
initialize
in class AbstractSystemManager
start
public void start()
throws Exception
stop
public void stop()
throws Exception
dispose
public void dispose()
export
protected Object export(String name,
Object object,
Class[] interfaces)
throws ManagerException
- Export the object to the particular management medium using
the supplied object and interfaces.
This needs to be implemented by subclasses.
- Overrides:
export
in class AbstractSystemManager
- Parameters:
name
- the name of objectobject
- the objectinterfaces
- the interfaces- Returns:
- the exported object
- Throws:
ManagerException
- if an error occurs
unexport
protected void unexport(String name,
Object exportedObject)
throws ManagerException
- Stop the exported object from being managed.
- Overrides:
unexport
in class AbstractSystemManager
- Parameters:
name
- the name of objectexportedObject
- the object return by export- Throws:
ManagerException
- if an error occurs
verifyInterface
protected void verifyInterface(Class clazz)
throws ManagerException
- Verify that an interface conforms to the requirements of management medium.
- Overrides:
verifyInterface
in class AbstractSystemManager
- Parameters:
clazz
- the interface class- Throws:
ManagerException
- if verification fails
getMBeanServer
protected javax.management.MBeanServer getMBeanServer()
setMBeanServer
protected void setMBeanServer(javax.management.MBeanServer mBeanServer)
getDomain
protected String getDomain()
setDomain
protected void setDomain(String domain)
createMBeanServer
protected abstract javax.management.MBeanServer createMBeanServer()
throws Exception
- Creates a new MBeanServer.
The subclass should implement this to create specific MBeanServer.
createTarget
protected Target createTarget(String name,
Object object,
Class[] interfaces)
- Creates a target that can then be exported for management. A topic is created
for each interface and for topics specified in the mxinfo file, if present
- Parameters:
name
- name of the targetobject
- managed objectinterfaces
- interfaces to be exported- Returns:
- the management target
exportTarget
protected void exportTarget(Target target)
throws Exception
- Exports the target to the management repository. This is done by exporting
each topic in the target.
- Parameters:
target
- the management target
exportTopic
protected Object exportTopic(javax.management.modelmbean.ModelMBeanInfo topic,
Object target,
String targetName)
throws Exception
- Exports the topic to the management repository. The name of the topic in the
management repository will be the target name + the topic name
- Parameters:
topic
- the descriptor for the topictarget
- to be managedtargetName
- the target's name
Copyright © 2001 Apache Jakarta Project. All Rights Reserved.