org.objectweb.easybeans.naming.interceptors
Class JettyENCInterceptor

java.lang.Object
  extended by org.objectweb.easybeans.naming.interceptors.AbsENCInterceptor
      extended by org.objectweb.easybeans.naming.interceptors.JettyENCInterceptor
All Implemented Interfaces:
EasyBeansInterceptor, NamingInterceptor

public class JettyENCInterceptor
extends AbsENCInterceptor
implements NamingInterceptor

Interceptor used when EasyBeans is integrated in Jetty. As the java: namespace is managed by Jetty, EasyBeans needs to call Jetty objects in order to set java: context. But in Jetty, only java:comp can be configured. (comp is managed by a Factory class)

Author:
Florent Benoit

Field Summary
protected static java.lang.String JETTY_CONTEXT_FACTORY_CLASS
          Jetty's class for naming.
private static java.lang.reflect.Method resetComponentContextMethod
          Method used to reset the component context on the Jetty context factory.
private static java.lang.reflect.Method setComponentContextMethod
          Method used to set the component context on the Jetty context factory.
 
Constructor Summary
JettyENCInterceptor()
          Default constructor.
 
Method Summary
 java.lang.Object intercept(EasyBeansInvocationContext invocationContext)
          Sets Jetty ENC context.
 
Methods inherited from class org.objectweb.easybeans.naming.interceptors.AbsENCInterceptor
initContext, removeContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.easybeans.api.naming.NamingInterceptor
initContext, removeContext
 

Field Detail

JETTY_CONTEXT_FACTORY_CLASS

protected static final java.lang.String JETTY_CONTEXT_FACTORY_CLASS
Jetty's class for naming.

See Also:
Constant Field Values

setComponentContextMethod

private static java.lang.reflect.Method setComponentContextMethod
Method used to set the component context on the Jetty context factory.


resetComponentContextMethod

private static java.lang.reflect.Method resetComponentContextMethod
Method used to reset the component context on the Jetty context factory.

Constructor Detail

JettyENCInterceptor

public JettyENCInterceptor()
Default constructor. Gets a reference on the Jetty context factory and the methods that will be called

Method Detail

intercept

public java.lang.Object intercept(EasyBeansInvocationContext invocationContext)
                           throws java.lang.Exception
Sets Jetty ENC context.

Specified by:
intercept in interface EasyBeansInterceptor
Specified by:
intercept in class AbsENCInterceptor
Parameters:
invocationContext - context with useful attributes on the current invocation.
Returns:
result of the next invocation (to chain interceptors).
Throws:
java.lang.Exception - needs for signature of interceptor.