Top Description Constructors Methods
org.mortbay.naming

public Class NamingUtil

extends Object
Class Inheritance
Imports
java.util.HashMap, .Map, javax.naming.Binding, .Context, .Name, .NameNotFoundException, .NameParser, .NamingEnumeration, .NamingException, org.mortbay.log.Log

Util.java Created: Tue Jul 1 18:26:17 2003
Author
Jan Bartel
Version
1.0

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static Context
bind(Context
the context into which to bind
ctx
,
String
the name relative to context to bind
nameStr
,
Object
the object to be bound
obj
)

Bind an object to a context ensuring all subcontexts are created if necessary

public static Map<K, V>

Returns:

map: key is fully qualified name, value is the bound object
flattenBindings
(Context
the context containing the name for which to list the bindings
ctx
,
String
the name in the context to list
name
)

Do a deep listing of the bindings for a context.

public static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

NamingUtilback to summary
public NamingUtil()

Method Detail

bindback to summary
public static Context bind(Context ctx, String nameStr, Object obj) throws NamingException

Bind an object to a context ensuring all subcontexts are created if necessary

Parameters
ctx:Context

the context into which to bind

nameStr:String

the name relative to context to bind

obj:Object

the object to be bound

Exceptions
NamingException:
if an error occurs
flattenBindingsback to summary
public static Map<K, V> flattenBindings(Context ctx, String name) throws NamingException

Do a deep listing of the bindings for a context.

Parameters
ctx:Context

the context containing the name for which to list the bindings

name:String

the name in the context to list

Returns:Map<K, V>

map: key is fully qualified name, value is the bound object

unbindback to summary
public static void unbind(Context ctx) throws NamingException