public class JMXExposed<T> extends AbstractBehavior<T>
ComponentAdapter that is exposing a component as MBean in a MBeanServer.ComponentAdapter.NOTHINGdelegate| Constructor and Description |
|---|
JMXExposed(ComponentAdapter<T> delegate,
MBeanServer mBeanServer)
Construct a JMXExposed behaviour.
|
JMXExposed(ComponentAdapter<T> delegate,
MBeanServer mBeanServer,
DynamicMBeanProvider[] providers)
Construct a JMXExposed behaviour
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose(Object component) |
T |
getComponentInstance(PicoContainer container,
Type into)
Retrieve the component instance.
|
String |
getDescriptor() |
boolean |
hasLifecycle(Class<?> type) |
accept, changeMonitor, componentHasLifecycle, currentMonitor, dispose, findAdapterOfType, getComponentImplementation, getComponentInstance, getComponentKey, getDelegate, isLazy, isStarted, start, start, stop, stop, toString, verifypublic JMXExposed(ComponentAdapter<T> delegate, MBeanServer mBeanServer, DynamicMBeanProvider[] providers) throws NullPointerException
delegate - The delegated ComponentAdapter.mBeanServer - The MBeanServer used for registering the MBean.providers - An array with providers for converting the component instance into a
DynamicMBean.NullPointerException - Thrown if the MBeanServer or the array with the DynamicMBeanProvider
instances is null.public JMXExposed(ComponentAdapter<T> delegate, MBeanServer mBeanServer) throws NullPointerException
DynamicMBeanComponentProvider as default to
register any component instance in the MBeanServer, that is already a
DynamicMBean.delegate - The delegated ComponentAdapter.mBeanServer - The MBeanServer used for registering the MBean.NullPointerException - Thrown if the MBeanServer or the array with the DynamicMBeanProvider
instances is null.public T getComponentInstance(PicoContainer container, Type into) throws PicoCompositionException
MBeanServer,
if a provider can return a DynamicMBean for it.
Note, that you will have to wrap this ComponentAdapter with a Cached to avoid
the registration of the same component again.
getComponentInstance in interface ComponentAdapter<T>getComponentInstance in class AbstractBehavior<T>PicoCompositionException - Thrown by the delegate or if the registering of the
DynamicMBean in the MBeanServer fails.AbstractBehavior#getComponentInstance(org.picocontainer.PicoContainer, java.lang.Class)public String getDescriptor()
public void dispose(Object component)
dispose in interface LifecycleStrategydispose in class AbstractBehavior<T>public boolean hasLifecycle(Class<?> type)
hasLifecycle in interface LifecycleStrategyhasLifecycle in class AbstractBehavior<T>Copyright © 2003-2014 Codehaus. All Rights Reserved.