org.jboss.invocation
Class ContextClassLoaderInterceptor
java.lang.Object
org.jboss.invocation.ContextClassLoaderInterceptor
- All Implemented Interfaces:
- Serializable, Interceptor
public final class ContextClassLoaderInterceptor
- extends Object
- implements Interceptor, Serializable
An interceptor which sets the thread context class loader for the duration of an invocation.
Note that this interceptor is only serializable if the given class loader is serializable.
- Author:
- David M. Lloyd
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ContextClassLoaderInterceptor
public ContextClassLoaderInterceptor(ClassLoader classLoader)
- Construct a new instance.
- Parameters:
classLoader
- the class loader to use
processInvocation
public Object processInvocation(InterceptorContext context)
throws Exception
- Process an invocation. The invocation can be handled directly, or passed on to the next processor in the
chain.
- Specified by:
processInvocation
in interface Interceptor
- Parameters:
context
- the interceptor context
- Returns:
- the result of the invocation
- Throws:
Exception
- If the underlying invocation resulted in some exception
Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.