Package org.eclipse.jetty.jndi
Class NamingUtil
- java.lang.Object
-
- org.eclipse.jetty.jndi.NamingUtil
-
public class NamingUtil extends Object
Naming Utility Methods
-
-
Constructor Summary
Constructors Constructor Description NamingUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Context
bind(Context ctx, String nameStr, Object obj)
Bind an object to a context ensuring all sub-contexts are created if necessarystatic Map
flattenBindings(Context ctx, String name)
Do a deep listing of the bindings for a context.static void
unbind(Context ctx)
-
-
-
Field Detail
-
__log
public static final Logger __log
-
-
Method Detail
-
bind
public static Context bind(Context ctx, String nameStr, Object obj) throws NamingException
Bind an object to a context ensuring all sub-contexts are created if necessary- Parameters:
ctx
- the context into which to bindnameStr
- the name relative to context to bindobj
- the object to be bound- Returns:
- the bound context
- Throws:
NamingException
- if an error occurs
-
unbind
public static void unbind(Context ctx) throws NamingException
- Throws:
NamingException
-
flattenBindings
public static Map flattenBindings(Context ctx, String name) throws NamingException
Do a deep listing of the bindings for a context.- Parameters:
ctx
- the context containing the name for which to list the bindingsname
- the name in the context to list- Returns:
- map: key is fully qualified name, value is the bound object
- Throws:
NamingException
- if unable to flatten bindings
-
-