mx4j.server.interceptor
Class MBeanServerInterceptorConfigurator

java.lang.Object
  extended bymx4j.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.9 $

Field Summary
static java.lang.String OBJECT_NAME
           
 
Constructor Summary
MBeanServerInterceptorConfigurator(javax.management.MBeanServer server)
          Creates an instance of this configurator, for the given MBeanServer
 
Method Summary
 void addInterceptor(MBeanServerInterceptor interceptor)
          Appends the given interceptor, provided by the client, to the existing interceptor chain.
 void addPostInterceptor(MBeanServerInterceptor interceptor)
          Adds the given interceptor at the end of the interceptor chain, after the custom interceptors that may be added via addInterceptor(mx4j.server.interceptor.MBeanServerInterceptor).
 void addPreInterceptor(MBeanServerInterceptor interceptor)
          Adds the given interceptor at the beginning of the interceptor chain, before the custom interceptors that may be added via addInterceptor(mx4j.server.interceptor.MBeanServerInterceptor).
 void clearInterceptors()
          Removes all the interceptors added via addInterceptor(MBeanServerInterceptor interceptor).
 MBeanServerInterceptor getHeadInterceptor()
          Returns the head interceptor of the interceptor chain.
 boolean isRunning()
          Returns whether this configurator is running and thus if the MBeanServer can accept incoming calls
 void registerInterceptor(MBeanServerInterceptor interceptor, javax.management.ObjectName name)
          Appends the given interceptor, provided by the client, to the existing interceptor chain and registers it as MBean.
 void start()
          Starts this configurator, so that the MBeanServer is now able to accept incoming calls.
 void stop()
          Stops this configurator, so that the MBeanServer is not able to accept incoming calls.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OBJECT_NAME

public static final java.lang.String OBJECT_NAME
See Also:
Constant Field Values
Constructor Detail

MBeanServerInterceptorConfigurator

public MBeanServerInterceptorConfigurator(javax.management.MBeanServer server)
Creates an instance of this configurator, for the given MBeanServer

Method Detail

addInterceptor

public void addInterceptor(MBeanServerInterceptor interceptor)
Appends the given interceptor, provided by the client, to the existing interceptor chain.

Specified by:
addInterceptor in interface MBeanServerInterceptorConfiguratorMBean
See Also:
registerInterceptor(mx4j.server.interceptor.MBeanServerInterceptor, javax.management.ObjectName)

registerInterceptor

public void registerInterceptor(MBeanServerInterceptor interceptor,
                                javax.management.ObjectName name)
                         throws javax.management.MBeanException
Appends the given interceptor, provided by the client, to the existing interceptor chain and registers it as MBean.

Specified by:
registerInterceptor in interface MBeanServerInterceptorConfiguratorMBean
Throws:
javax.management.MBeanException
See Also:
addInterceptor(mx4j.server.interceptor.MBeanServerInterceptor)

clearInterceptors

public void clearInterceptors()
Removes all the interceptors added via addInterceptor(MBeanServerInterceptor interceptor).

Specified by:
clearInterceptors in interface MBeanServerInterceptorConfiguratorMBean
See Also:
addInterceptor(mx4j.server.interceptor.MBeanServerInterceptor)

addPreInterceptor

public void addPreInterceptor(MBeanServerInterceptor interceptor)
Adds the given interceptor at the beginning of the interceptor chain, before the custom interceptors that may be added via addInterceptor(mx4j.server.interceptor.MBeanServerInterceptor). This method is called by the MBeanServer during initialization, to configure the interceptors needed to work properly.


addPostInterceptor

public void addPostInterceptor(MBeanServerInterceptor interceptor)
Adds the given interceptor at the end of the interceptor chain, after the custom interceptors that may be added via addInterceptor(mx4j.server.interceptor.MBeanServerInterceptor). This method is called by the MBeanServer during initialization, to configure the interceptors needed to work properly.


getHeadInterceptor

public MBeanServerInterceptor getHeadInterceptor()
Returns the head interceptor of the interceptor chain. The head interceptor is always present.


start

public void start()
Starts this configurator, so that the MBeanServer is now able to accept incoming calls.

Specified by:
start in interface MBeanServerInterceptorConfiguratorMBean
See Also:
stop(), isRunning()

stop

public void stop()
Stops this configurator, so that the MBeanServer is not able to accept incoming calls.

Specified by:
stop in interface MBeanServerInterceptorConfiguratorMBean
See Also:
start()

isRunning

public boolean isRunning()
Returns whether this configurator is running and thus if the MBeanServer can accept incoming calls

Specified by:
isRunning in interface MBeanServerInterceptorConfiguratorMBean
See Also:
start()


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