mx4j.server.interceptor

Class DefaultMBeanServerInterceptor

Implemented Interfaces:
DefaultMBeanServerInterceptorMBean, MBeanServerInterceptor
Known Direct Subclasses:
ContextClassLoaderMBeanServerInterceptor, InvokerMBeanServerInterceptor, NotificationListenerMBeanServerInterceptor, SecurityMBeanServerInterceptor

public abstract class DefaultMBeanServerInterceptor
extends java.lang.Object
implements MBeanServerInterceptor, DefaultMBeanServerInterceptorMBean

Base class for MBeanServer --> MBean interceptors.
Version:
$Revision: 1.11 $

Fields inherited from interface mx4j.server.interceptor.MBeanServerInterceptor

POST_DEREGISTER, POST_REGISTER_FALSE, POST_REGISTER_TRUE, PRE_DEREGISTER, PRE_REGISTER

Constructor Summary

DefaultMBeanServerInterceptor()

Method Summary

void
addNotificationListener(MBeanMetaData metadata, javax.management.NotificationListener listener, javax.management.NotificationFilter filter, Object handback)
Object
getAttribute(MBeanMetaData metadata, String attribute)
javax.management.AttributeList
getAttributes(MBeanMetaData metadata, String[] attributes)
protected Logger
getLogger()
javax.management.MBeanInfo
getMBeanInfo(MBeanMetaData metadata)
protected MBeanServerInterceptor
getNext()
abstract String
getType()
Returns the type of this interceptor
void
instantiate(MBeanMetaData metadata, String className, String[] params, Object[] args)
Object
invoke(MBeanMetaData metadata, String method, String[] params, Object[] args)
boolean
isEnabled()
Returns whether this interceptor is enabled
void
registration(MBeanMetaData metadata, int operation)
void
removeNotificationListener(MBeanMetaData metadata, javax.management.NotificationListener listener)
void
removeNotificationListener(MBeanMetaData metadata, javax.management.NotificationListener listener, javax.management.NotificationFilter filter, Object handback)
void
setAttribute(MBeanMetaData metadata, javax.management.Attribute attribute)
javax.management.AttributeList
setAttributes(MBeanMetaData metadata, javax.management.AttributeList attributes)
void
setChain(List chain)
void
setEnabled(boolean enabled)
Enables or disables this interceptor

Constructor Details

DefaultMBeanServerInterceptor

protected DefaultMBeanServerInterceptor()

Method Details

addNotificationListener

public void addNotificationListener(MBeanMetaData metadata,
                                    javax.management.NotificationListener listener,
                                    javax.management.NotificationFilter filter,
                                    Object handback)
Specified by:
addNotificationListener in interface MBeanServerInterceptor

getAttribute

public Object getAttribute(MBeanMetaData metadata,
                           String attribute)
            throws javax.management.MBeanException,
                   javax.management.AttributeNotFoundException,
                   javax.management.ReflectionException
Specified by:
getAttribute in interface MBeanServerInterceptor

getAttributes

public javax.management.AttributeList getAttributes(MBeanMetaData metadata,
                                                    String[] attributes)
Specified by:
getAttributes in interface MBeanServerInterceptor

getLogger

protected Logger getLogger()

getMBeanInfo

public javax.management.MBeanInfo getMBeanInfo(MBeanMetaData metadata)
Specified by:
getMBeanInfo in interface MBeanServerInterceptor

getNext

protected MBeanServerInterceptor getNext()

getType

public abstract String getType()
Returns the type of this interceptor
Specified by:
getType in interface MBeanServerInterceptor
getType in interface DefaultMBeanServerInterceptorMBean

instantiate

public void instantiate(MBeanMetaData metadata,
                        String className,
                        String[] params,
                        Object[] args)
            throws javax.management.ReflectionException,
                   javax.management.MBeanException
Specified by:
instantiate in interface MBeanServerInterceptor

invoke

public Object invoke(MBeanMetaData metadata,
                     String method,
                     String[] params,
                     Object[] args)
            throws javax.management.MBeanException,
                   javax.management.ReflectionException
Specified by:
invoke in interface MBeanServerInterceptor

isEnabled

public boolean isEnabled()
Returns whether this interceptor is enabled
Specified by:
isEnabled in interface DefaultMBeanServerInterceptorMBean

registration

public void registration(MBeanMetaData metadata,
                         int operation)
            throws javax.management.MBeanRegistrationException
Specified by:
registration in interface MBeanServerInterceptor

removeNotificationListener

public void removeNotificationListener(MBeanMetaData metadata,
                                       javax.management.NotificationListener listener)
            throws javax.management.ListenerNotFoundException
Specified by:
removeNotificationListener in interface MBeanServerInterceptor

removeNotificationListener

public void removeNotificationListener(MBeanMetaData metadata,
                                       javax.management.NotificationListener listener,
                                       javax.management.NotificationFilter filter,
                                       Object handback)
            throws javax.management.ListenerNotFoundException
Specified by:
removeNotificationListener in interface MBeanServerInterceptor

setAttribute

public void setAttribute(MBeanMetaData metadata,
                         javax.management.Attribute attribute)
            throws javax.management.MBeanException,
                   javax.management.AttributeNotFoundException,
                   javax.management.InvalidAttributeValueException,
                   javax.management.ReflectionException
Specified by:
setAttribute in interface MBeanServerInterceptor

setAttributes

public javax.management.AttributeList setAttributes(MBeanMetaData metadata,
                                                    javax.management.AttributeList attributes)
Specified by:
setAttributes in interface MBeanServerInterceptor

setChain

public void setChain(List chain)
Specified by:
setChain in interface MBeanServerInterceptor

setEnabled

public void setEnabled(boolean enabled)
Enables or disables this interceptor
Specified by:
setEnabled in interface DefaultMBeanServerInterceptorMBean
See Also:
isEnabled()

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