public class ContextBindings extends Object
Modifier and Type | Field and Description |
---|---|
protected static StringManager |
sm
The string manager for this package.
|
Constructor and Description |
---|
ContextBindings() |
Modifier and Type | Method and Description |
---|---|
static void |
bindClassLoader(Object obj,
Object token,
ClassLoader classLoader)
Binds a naming context to a class loader.
|
static void |
bindContext(Object obj,
Context context)
Binds an object and a naming context.
|
static void |
bindContext(Object obj,
Context context,
Object token)
Binds an object and a naming context.
|
static void |
bindThread(Object obj,
Object token)
Binds a naming context to a thread.
|
static Context |
getClassLoader()
Retrieves the naming context bound to a class loader.
|
static Context |
getThread()
Retrieves the naming context bound to the current thread.
|
static boolean |
isClassLoaderBound()
Tests if the thread context class loader is bound to a context.
|
static boolean |
isThreadBound()
Tests if current thread is bound to a naming context.
|
static void |
unbindClassLoader(Object obj,
Object token,
ClassLoader classLoader)
Unbinds a naming context and a class loader.
|
static void |
unbindContext(Object obj,
Object token)
Unbinds an object and a naming context.
|
static void |
unbindThread(Object obj,
Object token)
Unbinds a thread and a naming context.
|
protected static final StringManager sm
public static void bindContext(Object obj, Context context)
obj
- Object to bind with naming contextcontext
- Associated naming context instancepublic static void bindContext(Object obj, Context context, Object token)
obj
- Object to bind with naming contextcontext
- Associated naming context instancetoken
- Security tokenpublic static void unbindContext(Object obj, Object token)
obj
- Object to unbindtoken
- Security tokenpublic static void bindThread(Object obj, Object token) throws NamingException
obj
- Object bound to the required naming contexttoken
- Security tokenNamingException
public static void unbindThread(Object obj, Object token)
obj
- Object bound to the required naming contexttoken
- Security tokenpublic static Context getThread() throws NamingException
NamingException
public static boolean isThreadBound()
public static void bindClassLoader(Object obj, Object token, ClassLoader classLoader) throws NamingException
obj
- Object bound to the required naming contexttoken
- Security tokenclassLoader
- The class loader to bind to the naming contextNamingException
public static void unbindClassLoader(Object obj, Object token, ClassLoader classLoader)
obj
- Object bound to the required naming contexttoken
- Security tokenclassLoader
- The class loader bound to the naming contextpublic static Context getClassLoader() throws NamingException
NamingException
public static boolean isClassLoaderBound()
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.