|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.picocontainer.visitors.AbstractPicoVisitor org.picocontainer.visitors.TraversalCheckingVisitor org.picocontainer.gems.jmx.JMXVisitor
public class JMXVisitor
A PicoVisitor
to register JMX components for components of a PicoContainer
tree in
a MBeanServer
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.picocontainer.visitors.AbstractPicoVisitor |
---|
AbstractPicoVisitor.PicoVisitorTraversalException |
Field Summary |
---|
Fields inherited from interface org.picocontainer.PicoVisitor |
---|
ABORT_TRAVERSAL, CONTINUE_TRAVERSAL |
Constructor Summary | |
---|---|
JMXVisitor(MBeanServer server)
Construct a JMXVisitor. |
|
JMXVisitor(MBeanServer server,
DynamicMBeanProvider[] providers)
Construct a JMXVisitor. |
Method Summary | |
---|---|
protected ObjectInstance |
register(DynamicMBean dynamicMBean,
ObjectName objectName)
Register a MBean in the MBeanServer. |
Object |
traverse(Object node)
Entry point for the visitor traversal. |
void |
visitComponentAdapter(ComponentAdapter componentAdapter)
Register the component as MBean. |
boolean |
visitContainer(PicoContainer pico)
Provides the PicoContainer, that can resolve the components to register as MBean. |
Methods inherited from class org.picocontainer.visitors.TraversalCheckingVisitor |
---|
visitComponentFactory, visitParameter |
Methods inherited from class org.picocontainer.visitors.AbstractPicoVisitor |
---|
checkTraversal |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JMXVisitor(MBeanServer server)
MBeanServer
, that is
already a DynamicMBean
. The ObjectName
will use the default domain of the MBeanServer and has a
type key with the class name (without package name) as value.
server
- The MBeanServer
to use for registering the MBeans.public JMXVisitor(MBeanServer server, DynamicMBeanProvider[] providers)
server
- The MBeanServer
to use for registering the MBeans.providers
- The providers to deliver the DynamicMBeans.Method Detail |
---|
public Object traverse(Object node)
traverse
in interface PicoVisitor
traverse
in class AbstractPicoVisitor
Set
with all ObjectInstance instances retrieved from the MBeanServer
for the
registered MBeans.AbstractPicoVisitor.traverse(java.lang.Object)
public boolean visitContainer(PicoContainer pico)
visitContainer
in interface PicoVisitor
visitContainer
in class TraversalCheckingVisitor
PicoVisitor.visitContainer(org.picocontainer.PicoContainer)
public void visitComponentAdapter(ComponentAdapter componentAdapter)
visitComponentAdapter
in interface PicoVisitor
visitComponentAdapter
in class TraversalCheckingVisitor
PicoVisitor.visitComponentAdapter(org.picocontainer.ComponentAdapter)
protected ObjectInstance register(DynamicMBean dynamicMBean, ObjectName objectName) throws JMXRegistrationException
dynamicMBean
- the DynamicMBean
to register.objectName
- the ObjectName
of the MBean registered the MBeanServer
.
ObjectInstance
returned from the MBeanServer after registration.
JMXRegistrationException
- Thrown if MBean cannot be registered.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |