mx4j.server.interceptor

Class MBeanServerInterceptorConfigurator

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 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(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(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.

Field Details

OBJECT_NAME

public static final String OBJECT_NAME

Constructor Details

MBeanServerInterceptorConfigurator

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

Method Details

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

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(MBeanServerInterceptor). This method is called by the MBeanServer during initialization, to configure the interceptors needed to work properly.

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(MBeanServerInterceptor). This method is called by the MBeanServer during initialization, to configure the interceptors needed to work properly.

clearInterceptors

public void clearInterceptors()
Removes all the interceptors added via addInterceptor(MBeanServerInterceptor interceptor).
Specified by:
clearInterceptors in interface MBeanServerInterceptorConfiguratorMBean

getHeadInterceptor

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

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()

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

start

public void start()
Starts this configurator, so that the MBeanServer is now able to accept incoming calls.
Specified by:
start in interface MBeanServerInterceptorConfiguratorMBean

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()

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