org.apache.naming

## Class ContextBindings

- java.lang.Object
- - org.apache.naming.ContextBindings

    public class ContextBindings
    extends Object

Handles the associations :

- Catalina context name with the NamingContext
- Calling thread with the NamingContext

Author:
  Remy Maucherat

### Field Summary

Fields
`protected static StringManager` `sm` The string manager for this package.

### Constructor Summary

Constructors
Constructor and Description
`ContextBindings()`

### Method Summary

Methods
`static void` `bindClassLoader(Object name)` Deprecated. - unused
`static void` `bindClassLoader(Object name, Object token)` Deprecated. - unused
`static void` `bindClassLoader(Object name, Object token, ClassLoader classLoader)` Binds a naming context to a thread.
`static void` `bindContext(Object name, Context context)` Binds a context name.
`static void` `bindContext(Object name, Context context, Object token)` Binds a context name.
`static void` `bindThread(Object name)` Deprecated. - unused
`static void` `bindThread(Object name, 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 a thread.
`static boolean` `isClassLoaderBound()` Tests if current class loader is bound to a context.
`static boolean` `isThreadBound()` Tests if current thread is bound to a context.
`static void` `unbindClassLoader(Object name)` Deprecated. - unused
`static void` `unbindClassLoader(Object name, Object token)` Deprecated. - unused
`static void` `unbindClassLoader(Object name, Object token, ClassLoader classLoader)` Unbinds a naming context to a class loader.
`static void` `unbindContext(Object name)` Deprecated. - unused
`static void` `unbindContext(Object name, Object token)` Unbind context name.
`static void` `unbindThread(Object name)` Deprecated. - unused
`static void` `unbindThread(Object name, Object token)` Unbinds a naming context to a thread.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### sm

    protected static final StringManager sm

The string manager for this package.

### Constructor Detail

#### ContextBindings

    public ContextBindings()

### Method Detail

#### bindContext

    public static void bindContext(Object name,
                   Context context)

Binds a context name.

Parameters:
  `name` - Name of the context
  `context` - Associated naming context instance

#### bindContext

    public static void bindContext(Object name,
                   Context context,
                   Object token)

Binds a context name.

Parameters:
  `name` - Name of the context
  `context` - Associated naming context instance
  `token` - Security token

#### unbindContext

    @Deprecated
    public static void unbindContext(Object name)

Deprecated. - unused
Unbind context name.

Parameters:
  `name` - Name of the context

#### unbindContext

    public static void unbindContext(Object name,
                     Object token)

Unbind context name.

Parameters:
  `name` - Name of the context
  `token` - Security token

#### bindThread

    @Deprecated
    public static void bindThread(Object name)
                           throws NamingException

Deprecated. - unused
Binds a naming context to a thread.

Parameters:
  `name` - Name of the context
Throws:
  `NamingException`

#### bindThread

    public static void bindThread(Object name,
                  Object token)
                           throws NamingException

Binds a naming context to a thread.

Parameters:
  `name` - Name of the context
  `token` - Security token
Throws:
  `NamingException`

#### unbindThread

    @Deprecated
    public static void unbindThread(Object name)

Deprecated. - unused
Unbinds a naming context to a thread.

Parameters:
  `name` - Name of the context

#### unbindThread

    public static void unbindThread(Object name,
                    Object token)

Unbinds a naming context to a thread.

Parameters:
  `name` - Name of the context
  `token` - Security token

#### getThread

    public static Context getThread()
                             throws NamingException

Retrieves the naming context bound to a thread.

Throws:
  `NamingException`

#### isThreadBound

    public static boolean isThreadBound()

Tests if current thread is bound to a context.

#### bindClassLoader

    @Deprecated
    public static void bindClassLoader(Object name)
                                throws NamingException

Deprecated. - unused
Binds a naming context to a class loader.

Parameters:
  `name` - Name of the context
Throws:
  `NamingException`

#### bindClassLoader

    @Deprecated
    public static void bindClassLoader(Object name,
                                  Object token)
                                throws NamingException

Deprecated. - unused
Binds a naming context to a thread.

Parameters:
  `name` - Name of the context
  `token` - Security token
Throws:
  `NamingException`

#### bindClassLoader

    public static void bindClassLoader(Object name,
                       Object token,
                       ClassLoader classLoader)
                                throws NamingException

Binds a naming context to a thread.

Parameters:
  `name` - Name of the context
  `token` - Security token
Throws:
  `NamingException`

#### unbindClassLoader

    @Deprecated
    public static void unbindClassLoader(Object name)

Deprecated. - unused
Unbinds a naming context to a class loader.

Parameters:
  `name` - Name of the context

#### unbindClassLoader

    @Deprecated
    public static void unbindClassLoader(Object name,
                                    Object token)

Deprecated. - unused
Unbinds a naming context to a class loader.

Parameters:
  `name` - Name of the context
  `token` - Security token

#### unbindClassLoader

    public static void unbindClassLoader(Object name,
                         Object token,
                         ClassLoader classLoader)

Unbinds a naming context to a class loader.

Parameters:
  `name` - Name of the context
  `token` - Security token

#### getClassLoader

    public static Context getClassLoader()
                                  throws NamingException

Retrieves the naming context bound to a class loader.

Throws:
  `NamingException`

#### isClassLoaderBound

    public static boolean isClassLoaderBound()

Tests if current class loader is bound to a context.