org.eclipse.jetty.jndi
public class ContextFactory extends java.lang.Object implements javax.naming.spi.ObjectFactory
Constructor and Description |
---|
ContextFactory() |
Modifier and Type | Method and Description |
---|---|
static void |
dump(java.lang.Appendable out,
java.lang.String indent) |
javax.naming.Context |
getContextForClassLoader(java.lang.ClassLoader loader)
Find the naming Context for the given classloader
|
java.lang.Object |
getObjectInstance(java.lang.Object obj,
javax.naming.Name name,
javax.naming.Context nameCtx,
java.util.Hashtable env)
Find or create a context which pertains to a classloader.
|
NamingContext |
newNamingContext(java.lang.Object obj,
java.lang.ClassLoader loader,
java.util.Hashtable env,
javax.naming.Name name,
javax.naming.Context parentCtx)
Create a new NamingContext.
|
static void |
resetComponentContext(javax.naming.Context ctx)
Set back the context with the given value.
|
static javax.naming.Context |
setComponentContext(javax.naming.Context ctx)
Associate the given Context with the current thread.
|
public java.lang.Object getObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable env) throws java.lang.Exception
getObjectInstance
in interface javax.naming.spi.ObjectFactory
java.lang.Exception
ObjectFactory.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)
public NamingContext newNamingContext(java.lang.Object obj, java.lang.ClassLoader loader, java.util.Hashtable env, javax.naming.Name name, javax.naming.Context parentCtx) throws java.lang.Exception
obj
- loader
- env
- name
- parentCtx
- java.lang.Exception
public javax.naming.Context getContextForClassLoader(java.lang.ClassLoader loader)
loader
- public static javax.naming.Context setComponentContext(javax.naming.Context ctx)
ctx
- the context to associate to the current thread.public static void resetComponentContext(javax.naming.Context ctx)
ctx
- the context to associate to the current thread.public static void dump(java.lang.Appendable out, java.lang.String indent) throws java.io.IOException
java.io.IOException
Copyright © 2014. All Rights Reserved.