mx4j.server.interceptor

Interface MBeanServerInterceptor

Known Implementing Classes:
ContextClassLoaderMBeanServerInterceptor, DefaultMBeanServerInterceptor, InvokerMBeanServerInterceptor, NotificationListenerMBeanServerInterceptor, SecurityMBeanServerInterceptor

public interface MBeanServerInterceptor

MBeanServer --> MBean interceptor. These interceptors are used internally to implement MBeanServer functionality prior to call MBeans, and can be used to customize MBeanServer implementation by users.
Version:
$Revision: 1.6 $

Field Summary

static int
POST_DEREGISTER
Constant used to specify the status of the MBean registration in registration(MBeanMetaData,int)
static int
POST_REGISTER_FALSE
Constant used to specify the status of the MBean registration in registration(MBeanMetaData,int)
static int
POST_REGISTER_TRUE
Constant used to specify the status of the MBean registration in registration(MBeanMetaData,int)
static int
PRE_DEREGISTER
Constant used to specify the status of the MBean registration in registration(MBeanMetaData,int)
static int
PRE_REGISTER
Constant used to specify the status of the MBean registration in registration(MBeanMetaData,int)

Method Summary

void
addNotificationListener(MBeanMetaData metadata, javax.management.NotificationListener listener, javax.management.NotificationFilter filter, Object handback)
Adds the given notification listener to the MBean, along with the given filter and handback
Object
getAttribute(MBeanMetaData metadata, String attribute)
Gets the specified attribute value from the MBean instance.
javax.management.AttributeList
getAttributes(MBeanMetaData metadata, String[] attributes)
Gets the specified attributes values from the MBean instance.
javax.management.MBeanInfo
getMBeanInfo(MBeanMetaData metadata)
Calls getMBeanInfo on the MBean instance (only on DynamicMBeans).
String
getType()
A concise string that tells the type of this interceptor
void
instantiate(MBeanMetaData metadata, String className, String[] params, Object[] args)
Instantiate the given className passing the given arguments to the constructor with the given signature
Object
invoke(MBeanMetaData metadata, String method, String[] params, Object[] args)
Invokes the specified MBean operation on the MBean instance
void
registration(MBeanMetaData metadata, int operation)
Calls the specified javax.management.MBeanRegistration method on the MBean instance.
void
removeNotificationListener(MBeanMetaData metadata, javax.management.NotificationListener listener)
Removes the given notification listener from the MBean.
void
removeNotificationListener(MBeanMetaData metadata, javax.management.NotificationListener listener, javax.management.NotificationFilter filter, Object handback)
Removes the given notification listener from the MBean, specified by the given filter and handback.
void
setAttribute(MBeanMetaData metadata, javax.management.Attribute attribute)
Sets the specified attribute value on the MBean instance.
javax.management.AttributeList
setAttributes(MBeanMetaData metadata, javax.management.AttributeList attributes)
Sets the specified attributes values on the MBean instance.
void
setChain(List interceptors)
Sets the chain of interceptors on this interceptor.

Field Details

POST_DEREGISTER

public static final int POST_DEREGISTER
Field Value:
5

POST_REGISTER_FALSE

public static final int POST_REGISTER_FALSE
Field Value:
3

POST_REGISTER_TRUE

public static final int POST_REGISTER_TRUE
Field Value:
2

PRE_DEREGISTER

public static final int PRE_DEREGISTER
Field Value:
4

PRE_REGISTER

public static final int PRE_REGISTER
Field Value:
1

Method Details

addNotificationListener

public void addNotificationListener(MBeanMetaData metadata,
                                    javax.management.NotificationListener listener,
                                    javax.management.NotificationFilter filter,
                                    Object handback)
Adds the given notification listener to the MBean, along with the given filter and handback

getAttribute

public Object getAttribute(MBeanMetaData metadata,
                           String attribute)
            throws javax.management.MBeanException,
                   javax.management.AttributeNotFoundException,
                   javax.management.ReflectionException
Gets the specified attribute value from the MBean instance.

getAttributes

public javax.management.AttributeList getAttributes(MBeanMetaData metadata,
                                                    String[] attributes)
Gets the specified attributes values from the MBean instance.

getMBeanInfo

public javax.management.MBeanInfo getMBeanInfo(MBeanMetaData metadata)
Calls getMBeanInfo on the MBean instance (only on DynamicMBeans).

getType

public String getType()
A concise string that tells the type of this interceptor

instantiate

public void instantiate(MBeanMetaData metadata,
                        String className,
                        String[] params,
                        Object[] args)
            throws javax.management.ReflectionException,
                   javax.management.MBeanException
Instantiate the given className passing the given arguments to the constructor with the given signature

invoke

public Object invoke(MBeanMetaData metadata,
                     String method,
                     String[] params,
                     Object[] args)
            throws javax.management.MBeanException,
                   javax.management.ReflectionException
Invokes the specified MBean operation on the MBean instance

registration

public void registration(MBeanMetaData metadata,
                         int operation)
            throws javax.management.MBeanRegistrationException
Calls the specified javax.management.MBeanRegistration method on the MBean instance.

removeNotificationListener

public void removeNotificationListener(MBeanMetaData metadata,
                                       javax.management.NotificationListener listener)
            throws javax.management.ListenerNotFoundException
Removes the given notification listener from the MBean.

removeNotificationListener

public void removeNotificationListener(MBeanMetaData metadata,
                                       javax.management.NotificationListener listener,
                                       javax.management.NotificationFilter filter,
                                       Object handback)
            throws javax.management.ListenerNotFoundException
Removes the given notification listener from the MBean, specified by the given filter and handback.

setAttribute

public void setAttribute(MBeanMetaData metadata,
                         javax.management.Attribute attribute)
            throws javax.management.MBeanException,
                   javax.management.AttributeNotFoundException,
                   javax.management.InvalidAttributeValueException,
                   javax.management.ReflectionException
Sets the specified attribute value on the MBean instance.

setAttributes

public javax.management.AttributeList setAttributes(MBeanMetaData metadata,
                                                    javax.management.AttributeList attributes)
Sets the specified attributes values on the MBean instance.

setChain

public void setChain(List interceptors)
Sets the chain of interceptors on this interceptor. This interceptor will use this list to find the interceptor in the chain after itself
Parameters:
interceptors - The list of interceptors

Copyright © 2001-2005 The MX4J Contributors. All Rights Reserved.