mx4j.server.interceptor
Class MBeanServerInterceptorConfigurator

java.lang.Object
  |
  +--mx4j.server.interceptor.MBeanServerInterceptorConfigurator
All Implemented Interfaces:
MBeanServerInterceptorConfiguratorMBean

public class MBeanServerInterceptorConfigurator
extends java.lang.Object
implements MBeanServerInterceptorConfiguratorMBean

MBean that configures the MBeanServer --> MBean interceptor chain.

Version:
$Revision: 1.2 $
Author:
Simone Bordet

Fields inherited from interface mx4j.server.interceptor.MBeanServerInterceptorConfiguratorMBean
OBJECT_NAME
 
Constructor Summary
MBeanServerInterceptorConfigurator(MBeanServer server)
           
 
Method Summary
 void addInterceptor(MBeanServerInterceptor interceptor)
          Append the given interceptor to the interceptor chain.
 void clearInterceptors()
           
 MBeanServerInterceptor getHeadInterceptor()
          Returns the head interceptor.
 boolean isRunning()
          Returns whether the interceptor chain accept incoming calls or not.
 void registerInterceptor(MBeanServerInterceptor interceptor, ObjectName name)
          Append the given interceptor to the interceptor chain.
 void start()
          Starts accepting calls in the interceptor chain
 void stop()
          Suspends the called in the interceptor chain until they're resumed with start().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MBeanServerInterceptorConfigurator

public MBeanServerInterceptorConfigurator(MBeanServer server)
Method Detail

addInterceptor

public void addInterceptor(MBeanServerInterceptor interceptor)
Append the given interceptor to the interceptor chain. This method has effect only if this MBean is not running. The interceptor is not registered in the MBeanServer; use registerInterceptor(mx4j.server.interceptor.MBeanServerInterceptor, javax.management.ObjectName) to do so.
See Also:
isRunning()

registerInterceptor

public void registerInterceptor(MBeanServerInterceptor interceptor,
                                ObjectName name)
                         throws MBeanRegistrationException
Append the given interceptor to the interceptor chain. This method has effect only if this MBean is not running. The interceptor is registered in the MBeanServer; use addInterceptor(mx4j.server.interceptor.MBeanServerInterceptor) to avoid so.
See Also:
isRunning()

getHeadInterceptor

public MBeanServerInterceptor getHeadInterceptor()
Returns the head interceptor. There always is a head interceptor.

start

public void start()
Description copied from interface: MBeanServerInterceptorConfiguratorMBean
Starts accepting calls in the interceptor chain
Specified by:
start in interface MBeanServerInterceptorConfiguratorMBean

stop

public void stop()
Description copied from interface: MBeanServerInterceptorConfiguratorMBean
Suspends the called in the interceptor chain until they're resumed with MBeanServerInterceptorConfiguratorMBean.start().
Specified by:
stop in interface MBeanServerInterceptorConfiguratorMBean

isRunning

public boolean isRunning()
Description copied from interface: MBeanServerInterceptorConfiguratorMBean
Returns whether the interceptor chain accept incoming calls or not.
Specified by:
isRunning in interface MBeanServerInterceptorConfiguratorMBean

clearInterceptors

public void clearInterceptors()