## mx4j.tools.adaptor.interceptor
Class ContextClassLoaderAdaptorInterceptor

    java.lang.Object
      mx4j.tools.adaptor.interceptor.AdaptorInterceptor
          mx4j.tools.adaptor.interceptor.ContextClassLoaderAdaptorInterceptor

All Implemented Interfaces:
  AdaptorInterceptorMBean, Interceptor, Invocable

public class ContextClassLoaderAdaptorInterceptor
extends AdaptorInterceptor

The interceptor that sets the context classloader for incoming calls

Version:
  $Revision: 1.3 $

Constructor Summary
`ContextClassLoaderAdaptorInterceptor()`

Method Summary
`java.lang.String` `getType()` Returns the type of this interceptor
`boolean` `isEnabled()` This interceptor is always enabled
`protected void` `postInvoke(Invocation invocation)` Called after the real invocation in the interceptor chain.
`protected void` `preInvoke(Invocation invocation)` Called before the real invocation on the interceptor chain.
`void` `setEnabled(boolean value)` Cannot change the status of this attribute, this interceptor is always enabled
`void` `setMBeanServer(javax.management.MBeanServer server)`

Methods inherited from class mx4j.tools.adaptor.interceptor.AdaptorInterceptor
`doInvoke, getLogger, getMBeanServer, getNext, getObjectName, invoke, setNext, setObjectName, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ContextClassLoaderAdaptorInterceptor

    public ContextClassLoaderAdaptorInterceptor()

Method Detail

### setMBeanServer

    public void setMBeanServer(javax.management.MBeanServer server)

  Overrides:
    `setMBeanServer` in class `AdaptorInterceptor`

### getType

    public java.lang.String getType()

  Description copied from interface: `Interceptor`
  Returns the type of this interceptor

  Specified by:
    `getType` in interface `Interceptor`
  Overrides:
    `getType` in class `AdaptorInterceptor`

### setEnabled

    public void setEnabled(boolean value)

  Cannot change the status of this attribute, this interceptor is always enabled

  Specified by:
    `setEnabled` in interface `AdaptorInterceptorMBean`
  Overrides:
    `setEnabled` in class `AdaptorInterceptor`

### isEnabled

    public boolean isEnabled()

  This interceptor is always enabled

  Specified by:
    `isEnabled` in interface `AdaptorInterceptorMBean`
  Overrides:
    `isEnabled` in class `AdaptorInterceptor`

### preInvoke

    protected void preInvoke(Invocation invocation)
                      throws java.lang.Exception

  Description copied from class: `AdaptorInterceptor`
  Called before the real invocation on the interceptor chain.
  By default does nothing; exception thrown by this method will result in `AdaptorInterceptor.doInvoke(mx4j.tools.adaptor.interceptor.Invocation)` not being called. Subclasses normally override this method to perform some operation before the real invocation on the interceptor chain.

  Overrides:
    `preInvoke` in class `AdaptorInterceptor`
  Throws:
    `java.lang.Exception`
  See Also:
    `AdaptorInterceptor.postInvoke(mx4j.tools.adaptor.interceptor.Invocation)`

### postInvoke

    protected void postInvoke(Invocation invocation)
                       throws java.lang.Exception

  Description copied from class: `AdaptorInterceptor`
  Called after the real invocation in the interceptor chain.
  By default does nothing; exception thrown by this method will be just logged. This method is always called, even in case of exception thrown by `AdaptorInterceptor.preInvoke(mx4j.tools.adaptor.interceptor.Invocation)` or by `AdaptorInterceptor.doInvoke(mx4j.tools.adaptor.interceptor.Invocation)` Subclasses normally override this method to perform some operation after the real invocation on the interceptor chain.

  Overrides:
    `postInvoke` in class `AdaptorInterceptor`
  Throws:
    `java.lang.Exception`
  See Also:
    `AdaptorInterceptor.preInvoke(mx4j.tools.adaptor.interceptor.Invocation)`

Copyright © 2001-2003 MX4J Team. All Rights Reserved.