Interface MBeanServerForwarder
- All Superinterfaces:
MBeanServer, MBeanServerConnection
An object of this class implements the MBeanServer interface and
wraps another object that also implements that interface.
Typically, an implementation of this interface performs some action
in some or all methods of the MBeanServer
interface
before and/or after forwarding the method to the wrapped object.
Examples include security checking and logging.
- Since:
- 1.5
-
Method Summary
Modifier and TypeMethodDescriptionReturns the MBeanServer object to which requests will be forwarded.void
Sets the MBeanServer object to which requests will be forwarded after treatment by this object.Methods declared in interface MBeanServer
addNotificationListener, addNotificationListener, createMBean, createMBean, createMBean, createMBean, deserialize, deserialize, deserialize, getAttribute, getAttributes, getClassLoader, getClassLoaderFor, getClassLoaderRepository, getDefaultDomain, getDomains, getMBeanCount, getMBeanInfo, getObjectInstance, instantiate, instantiate, instantiate, instantiate, invoke, isInstanceOf, isRegistered, queryMBeans, queryNames, registerMBean, removeNotificationListener, removeNotificationListener, removeNotificationListener, removeNotificationListener, setAttribute, setAttributes, unregisterMBean
Modifier and TypeMethodDescriptionvoid
addNotificationListener
(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) Adds a listener to a registered MBean.void
addNotificationListener
(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) Adds a listener to a registered MBean.createMBean
(String className, ObjectName name) Instantiates and registers an MBean in the MBean server.createMBean
(String className, ObjectName name, Object[] params, String[] signature) Instantiates and registers an MBean in the MBean server.createMBean
(String className, ObjectName name, ObjectName loaderName) Instantiates and registers an MBean in the MBean server.createMBean
(String className, ObjectName name, ObjectName loaderName, Object[] params, String[] signature) Instantiates and registers an MBean in the MBean server.default ObjectInputStream
deserialize
(String className, byte[] data) Deprecated.default ObjectInputStream
deserialize
(String className, ObjectName loaderName, byte[] data) Deprecated.UsegetClassLoader
to obtain the class loader for deserialization.default ObjectInputStream
deserialize
(ObjectName name, byte[] data) Deprecated.UsegetClassLoaderFor
to obtain the appropriate class loader for deserialization.getAttribute
(ObjectName name, String attribute) Gets the value of a specific attribute of a named MBean.getAttributes
(ObjectName name, String[] attributes) Retrieves the values of several attributes of a named MBean.getClassLoader
(ObjectName loaderName) Return the namedClassLoader
.getClassLoaderFor
(ObjectName mbeanName) Return theClassLoader
that was used for loading the class of the named MBean.Return the ClassLoaderRepository for this MBeanServer.Returns the default domain used for naming the MBean.String[]
Returns the list of domains in which any MBean is currently registered.Returns the number of MBeans registered in the MBean server.getMBeanInfo
(ObjectName name) This method discovers the attributes and operations that an MBean exposes for management.getObjectInstance
(ObjectName name) Gets theObjectInstance
for a given MBean registered with the MBean server.instantiate
(String className) Instantiates an object using the list of all class loaders registered in the MBean server'sClass Loader Repository
.instantiate
(String className, Object[] params, String[] signature) Instantiates an object using the list of all class loaders registered in the MBean serverClass Loader Repository
.instantiate
(String className, ObjectName loaderName) Instantiates an object using the class Loader specified by itsObjectName
.instantiate
(String className, ObjectName loaderName, Object[] params, String[] signature) Instantiates an object.invoke
(ObjectName name, String operationName, Object[] params, String[] signature) Invokes an operation on an MBean.boolean
isInstanceOf
(ObjectName name, String className) Returns true if the MBean specified is an instance of the specified class, false otherwise.boolean
isRegistered
(ObjectName name) Checks whether an MBean, identified by its object name, is already registered with the MBean server.queryMBeans
(ObjectName name, QueryExp query) Gets MBeans controlled by the MBean server.queryNames
(ObjectName name, QueryExp query) Gets the names of MBeans controlled by the MBean server.registerMBean
(Object object, ObjectName name) Registers a pre-existing object as an MBean with the MBean server.void
removeNotificationListener
(ObjectName name, NotificationListener listener) Removes a listener from a registered MBean.void
removeNotificationListener
(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) Removes a listener from a registered MBean.void
removeNotificationListener
(ObjectName name, ObjectName listener) Removes a listener from a registered MBean.void
removeNotificationListener
(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) Removes a listener from a registered MBean.void
setAttribute
(ObjectName name, Attribute attribute) Sets the value of a specific attribute of a named MBean.setAttributes
(ObjectName name, AttributeList attributes) Sets the values of several attributes of a named MBean.void
unregisterMBean
(ObjectName name) Unregisters an MBean from the MBean server.
-
Method Details
-
getMBeanServer
MBeanServer getMBeanServer()Returns the MBeanServer object to which requests will be forwarded.- Returns:
- the MBeanServer object to which requests will be forwarded, or null if there is none.
- See Also:
-
setMBeanServer
Sets the MBeanServer object to which requests will be forwarded after treatment by this object.- Parameters:
mbs
- the MBeanServer object to which requests will be forwarded.- Throws:
IllegalArgumentException
- if this object is already forwarding to an MBeanServer object or ifmbs
is null or ifmbs
is identical to this object.- See Also:
-
MBeanServer.getClassLoaderRepository()
to obtain the class loader repository and use it to deserialize.