|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MBeanServerInterceptor
This interface specifies the behavior to be implemented by an
MBean Server Interceptor. An MBean Server Interceptor has
essentially the same interface as an MBean Server. An MBean Server
forwards received requests to its default interceptor, which may
handle them itself or forward them to other interceptors. The
default interceptor may be changed via the JdmkMBeanServer.setMBeanServerInterceptor(com.sun.jdmk.interceptor.MBeanServerInterceptor)
method.
The initial default interceptor provides the standard MBean
Server behavior. It handles a collection of named MBeans, each
represented by a Java object. A replacement default interceptor
may build on this behavior, for instance by adding logging or
security checks, before forwarding requests to the initial default
interceptor. Or, it may route each request to one of a number of
sub-interceptors, for instance based on the ObjectName
in
the request.
An interceptor, default or not, need not implement MBeans as Java objects, in the way that the initial default interceptor does. It may instead implement virtual MBeans, which do not exist as Java objects when they are not in use. For example, these MBeans could be implemented by forwarding requests to a database, or to a remote MBean server, or by performing system calls to query or modify system resources.
Note: This interface extends the MBeanInterceptor
interface for backward compatibility with the Java DMK 5.0.
In next releases, the methods defined in
MBeanInterceptor
may be moved to this interface
and the inheritance link broken.
Method Summary | |
---|---|
ClassLoader |
getClassLoader(ObjectName loaderName)
Return the named ClassLoader . |
ClassLoader |
getClassLoaderFor(ObjectName mbeanName)
Return the ClassLoader that was used for
loading the class of the named MBean. |
String[] |
getDomains()
Returns the list of domains in which any MBean is currently registered. |
ClassLoader |
getMBeanClassLoader(ObjectName mbeanName)
Deprecated. Use getClassLoaderFor(javax.management.ObjectName) |
void |
removeNotificationListener(ObjectName name,
NotificationListener listener,
NotificationFilter filter,
Object handback)
Removes a listener from a registered MBean. |
void |
removeNotificationListener(ObjectName name,
ObjectName listener,
NotificationFilter filter,
Object handback)
Removes a listener from a registered MBean. |
Methods inherited from interface com.sun.jdmk.MBeanInterceptor |
---|
addNotificationListener, addNotificationListener, createMBean, createMBean, getAttribute, getAttributes, getDefaultDomain, getMBeanCount, getMBeanInfo, getObjectInstance, invoke, isInstanceOf, isRegistered, queryMBeans, queryNames, registerMBean, removeNotificationListener, removeNotificationListener, setAttribute, setAttributes, unregisterMBean |
Method Detail |
---|
void removeNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException, ListenerNotFoundException
Removes a listener from a registered MBean.
The MBean must have a listener that exactly matches the
given listener
, filter
, and
handback
parameters. If there is more than one
such listener, only one is removed.
The filter
and handback
parameters
may be null if and only if they are null in a listener to be
removed.
name
- The name of the MBean on which the listener should
be removed.listener
- A listener that was previously added to this
MBean.filter
- The filter that was specified when the listener
was added.handback
- The handback that was specified when the
listener was added.
InstanceNotFoundException
- The MBean name provided
does not match any of the registered MBeans.
ListenerNotFoundException
- The listener is not
registered in the MBean, or it is not registered with the given
filter and handback.void removeNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException, ListenerNotFoundException
Removes a listener from a registered MBean.
The MBean must have a listener that exactly matches the
given listener
, filter
, and
handback
parameters. If there is more than one
such listener, only one is removed.
The filter
and handback
parameters
may be null if and only if they are null in a listener to be
removed.
name
- The name of the MBean on which the listener should
be removed.listener
- A listener that was previously added to this
MBean.filter
- The filter that was specified when the listener
was added.handback
- The handback that was specified when the
listener was added.
InstanceNotFoundException
- The MBean name provided
does not match any of the registered MBeans.
ListenerNotFoundException
- The listener is not
registered in the MBean, or it is not registered with the given
filter and handback.ClassLoader getClassLoaderFor(ObjectName mbeanName) throws InstanceNotFoundException
Return the ClassLoader
that was used for
loading the class of the named MBean.
mbeanName
- The ObjectName of the MBean.
InstanceNotFoundException
- if the named MBean is not found.ClassLoader getClassLoader(ObjectName loaderName) throws InstanceNotFoundException
Return the named ClassLoader
.
loaderName
- The ObjectName of the ClassLoader.
InstanceNotFoundException
- if the named ClassLoader is
not found.String[] getDomains()
ClassLoader getMBeanClassLoader(ObjectName mbeanName) throws InstanceNotFoundException
getClassLoaderFor(javax.management.ObjectName)
Return the ClassLoader
that was used for
loading the class of the named MBean.
getMBeanClassLoader
in interface MBeanInterceptor
mbeanName
- The ObjectName of the MBean.
InstanceNotFoundException
- if the named MBean is not found.
|
Open Source build 02 opendmk-1.0-b02 2007.10.01_19:17:46_MEST |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |