Package org.apache.cxf.management.jmx
Class InstrumentationManagerImpl
- java.lang.Object
-
- org.apache.cxf.management.jmx.InstrumentationManagerImpl
-
- All Implemented Interfaces:
BusLifeCycleListener,InstrumentationManager
public class InstrumentationManagerImpl extends Object implements InstrumentationManager, BusLifeCycleListener
The manager class for the JMXManagedComponent which hosts the JMXManagedComponents.
-
-
Constructor Summary
Constructors Constructor Description InstrumentationManagerImpl()InstrumentationManagerImpl(Bus bus)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description BusgetBus()MBeanServergetMBeanServer()Get the MBeanServer which hosts managed components NOTE: if the configuration is not set the JMXEnabled to be true, this method will return nullStringgetPersistentBusId()voidinit()voidinitComplete()Invoked when theBushas been initialized.booleanisEnabled()voidpostShutdown()Invoked after theBusis shutdown.voidpreShutdown()Invoked before theBusis shutdown.voidregister()Deprecated.voidregister(Object obj, ObjectName name)Registers object with management infrastructure with a specific name.voidregister(Object obj, ObjectName name, boolean forceRegistration)Registers object with management infrastructure with a specific name.ObjectNameregister(ManagedComponent i)Register a component with management infrastructure.ObjectNameregister(ManagedComponent i, boolean forceRegistration)Register a component with management infrastructure.voidsetBus(Bus bus)voidsetEnabled(boolean enabled)voidsetPersistentBusId(String id)voidsetServer(MBeanServer server)voidsetServerName(String s)voidsetUsePlatformMBeanServer(Boolean flag)voidshutdown()Cleans up and shutsdown management infrastructure.voidunregister(ObjectName name)Unregisters component based upon registered namevoidunregister(ManagedComponent component)Unregisters component with management infrastructure
-
-
-
Constructor Detail
-
InstrumentationManagerImpl
public InstrumentationManagerImpl()
-
InstrumentationManagerImpl
public InstrumentationManagerImpl(Bus bus)
-
-
Method Detail
-
getBus
public Bus getBus()
-
setBus
public void setBus(Bus bus)
-
setServerName
public void setServerName(String s)
-
setUsePlatformMBeanServer
public void setUsePlatformMBeanServer(Boolean flag)
-
setEnabled
public void setEnabled(boolean enabled)
-
isEnabled
public boolean isEnabled()
-
register
@Deprecated public void register()
Deprecated.
-
init
@PostConstruct public void init()
-
register
public void register(Object obj, ObjectName name) throws JMException
Description copied from interface:InstrumentationManagerRegisters object with management infrastructure with a specific name. Object must be annotated or implement standard MBean interface.- Specified by:
registerin interfaceInstrumentationManager- Throws:
JMException
-
register
public void register(Object obj, ObjectName name, boolean forceRegistration) throws JMException
Description copied from interface:InstrumentationManagerRegisters object with management infrastructure with a specific name. Object must be annotated or implement standard MBean interface.- Specified by:
registerin interfaceInstrumentationManagerforceRegistration- if set to true, then component will be registered despite existing component.- Throws:
JMException
-
register
public ObjectName register(ManagedComponent i) throws JMException
Description copied from interface:InstrumentationManagerRegister a component with management infrastructure. Component will supply registration name.- Specified by:
registerin interfaceInstrumentationManager- Returns:
- name used to register the component
- Throws:
JMException
-
register
public ObjectName register(ManagedComponent i, boolean forceRegistration) throws JMException
Description copied from interface:InstrumentationManagerRegister a component with management infrastructure. Component will supply registration name.- Specified by:
registerin interfaceInstrumentationManagerforceRegistration- if set to true, then component will be registered despite existing component.- Returns:
- name used to register the component
- Throws:
JMException
-
unregister
public void unregister(ManagedComponent component) throws JMException
Description copied from interface:InstrumentationManagerUnregisters component with management infrastructure- Specified by:
unregisterin interfaceInstrumentationManager- Throws:
JMException
-
unregister
public void unregister(ObjectName name) throws JMException
Description copied from interface:InstrumentationManagerUnregisters component based upon registered name- Specified by:
unregisterin interfaceInstrumentationManager- Throws:
JMException
-
getMBeanServer
public MBeanServer getMBeanServer()
Description copied from interface:InstrumentationManagerGet the MBeanServer which hosts managed components NOTE: if the configuration is not set the JMXEnabled to be true, this method will return null- Specified by:
getMBeanServerin interfaceInstrumentationManager- Returns:
- the MBeanServer
-
setServer
public void setServer(MBeanServer server)
-
shutdown
public void shutdown()
Description copied from interface:InstrumentationManagerCleans up and shutsdown management infrastructure.- Specified by:
shutdownin interfaceInstrumentationManager
-
initComplete
public void initComplete()
Description copied from interface:BusLifeCycleListenerInvoked when theBushas been initialized.- Specified by:
initCompletein interfaceBusLifeCycleListener
-
preShutdown
public void preShutdown()
Description copied from interface:BusLifeCycleListenerInvoked before theBusis shutdown.- Specified by:
preShutdownin interfaceBusLifeCycleListener
-
postShutdown
public void postShutdown()
Description copied from interface:BusLifeCycleListenerInvoked after theBusis shutdown.- Specified by:
postShutdownin interfaceBusLifeCycleListener
-
getPersistentBusId
public String getPersistentBusId()
- Specified by:
getPersistentBusIdin interfaceInstrumentationManager
-
setPersistentBusId
public void setPersistentBusId(String id)
- Specified by:
setPersistentBusIdin interfaceInstrumentationManager
-
-