org.objectweb.easybeans.naming.interceptors
Class ENCManager

java.lang.Object
  extended by org.objectweb.easybeans.naming.interceptors.ENCManager

public final class ENCManager
extends java.lang.Object

Detects the server type and return the correct interceptor to use depending of the application server. It could be EasyBeans, JOnAS or Tomcat.

Author:
Florent Benoit

Field Summary
private static java.lang.Class<? extends NamingInterceptor> encInterceptor
          Class used for the interceptor.
private static JLog logger
          Logger.
 
Constructor Summary
private ENCManager()
          No public constructor (utility class).
 
Method Summary
static java.lang.Class getInterceptorClass()
           
static void initContext(Factory factory, javax.naming.Context context)
          Init the context for the given factory.
static void removeContext(Factory factory)
          Remove the context associated to a factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static JLog logger
Logger.


encInterceptor

private static java.lang.Class<? extends NamingInterceptor> encInterceptor
Class used for the interceptor.

Constructor Detail

ENCManager

private ENCManager()
No public constructor (utility class).

Method Detail

getInterceptorClass

public static java.lang.Class getInterceptorClass()
Returns:
the class to use depending of the application server.

initContext

public static void initContext(Factory factory,
                               javax.naming.Context context)
Init the context for the given factory.

Parameters:
factory - the given factory
context - the context associated to the container URL.

removeContext

public static void removeContext(Factory factory)
Remove the context associated to a factory.

Parameters:
factory - the given factory