org.apache.felix.mosgi.jmx.agent.mx4j.server.interceptor
Interface MBeanServerInterceptor

All 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.1.1.1 $
Author:
Simone Bordet

Field Summary
static int POST_DEREGISTER
          Constant used to specify the status of the MBean registration in registration(org.apache.felix.mosgi.jmx.agent.mx4j.server.MBeanMetaData, int)
static int POST_REGISTER_FALSE
          Constant used to specify the status of the MBean registration in registration(org.apache.felix.mosgi.jmx.agent.mx4j.server.MBeanMetaData, int)
static int POST_REGISTER_TRUE
          Constant used to specify the status of the MBean registration in registration(org.apache.felix.mosgi.jmx.agent.mx4j.server.MBeanMetaData, int)
static int PRE_DEREGISTER
          Constant used to specify the status of the MBean registration in registration(org.apache.felix.mosgi.jmx.agent.mx4j.server.MBeanMetaData, int)
static int PRE_REGISTER
          Constant used to specify the status of the MBean registration in registration(org.apache.felix.mosgi.jmx.agent.mx4j.server.MBeanMetaData, int)
 
Method Summary
 void addNotificationListener(MBeanMetaData metadata, NotificationListener listener, 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.
 AttributeList getAttributes(MBeanMetaData metadata, String[] attributes)
          Gets the specified attributes values from the MBean instance.
 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 MBeanRegistration method on the MBean instance.
 void removeNotificationListener(MBeanMetaData metadata, NotificationListener listener)
          Removes the given notification listener from the MBean.
 void removeNotificationListener(MBeanMetaData metadata, NotificationListener listener, NotificationFilter filter, Object handback)
          Removes the given notification listener from the MBean, specified by the given filter and handback.
 void setAttribute(MBeanMetaData metadata, Attribute attribute)
          Sets the specified attribute value on the MBean instance.
 AttributeList setAttributes(MBeanMetaData metadata, AttributeList attributes)
          Sets the specified attributes values on the MBean instance.
 void setChain(List interceptors)
          Sets the chain of interceptors on this interceptor.
 

Field Detail

PRE_REGISTER

static final int PRE_REGISTER
Constant used to specify the status of the MBean registration in registration(org.apache.felix.mosgi.jmx.agent.mx4j.server.MBeanMetaData, int)

See Also:
Constant Field Values

POST_REGISTER_TRUE

static final int POST_REGISTER_TRUE
Constant used to specify the status of the MBean registration in registration(org.apache.felix.mosgi.jmx.agent.mx4j.server.MBeanMetaData, int)

See Also:
Constant Field Values

POST_REGISTER_FALSE

static final int POST_REGISTER_FALSE
Constant used to specify the status of the MBean registration in registration(org.apache.felix.mosgi.jmx.agent.mx4j.server.MBeanMetaData, int)

See Also:
Constant Field Values

PRE_DEREGISTER

static final int PRE_DEREGISTER
Constant used to specify the status of the MBean registration in registration(org.apache.felix.mosgi.jmx.agent.mx4j.server.MBeanMetaData, int)

See Also:
Constant Field Values

POST_DEREGISTER

static final int POST_DEREGISTER
Constant used to specify the status of the MBean registration in registration(org.apache.felix.mosgi.jmx.agent.mx4j.server.MBeanMetaData, int)

See Also:
Constant Field Values
Method Detail

getType

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


setChain

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

addNotificationListener

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


removeNotificationListener

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

Throws:
ListenerNotFoundException

removeNotificationListener

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

Throws:
ListenerNotFoundException

instantiate

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

Throws:
ReflectionException
MBeanException

registration

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

Throws:
MBeanRegistrationException

getMBeanInfo

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


invoke

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

Throws:
MBeanException
ReflectionException

getAttributes

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


setAttributes

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


getAttribute

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

Throws:
MBeanException
AttributeNotFoundException
ReflectionException

setAttribute

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

Throws:
MBeanException
AttributeNotFoundException
InvalidAttributeValueException
ReflectionException


Copyright © 2011 Apache Software Foundation. All Rights Reserved.