|
||||||||||
PREV CLASS (src) NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.naming.Util
A static utility class for common JNDI operations.
Constructor Summary | |
Util()
|
Method Summary | |
protected static void |
appendClassInfo(java.lang.StringBuffer buffer,
java.lang.Class clazz)
Append Class Info |
static void |
bind(javax.naming.Context ctx,
javax.naming.Name name,
java.lang.Object value)
Bind val to name in ctx, and make sure that all intermediate contexts exist |
static void |
bind(javax.naming.Context ctx,
java.lang.String name,
java.lang.Object value)
Bind val to name in ctx, and make sure that all intermediate contexts exist |
protected static void |
checkObject(javax.naming.Context context,
java.lang.String name,
java.lang.Object object,
java.lang.Class clazz)
Checks an object implements the given class |
static javax.naming.Context |
createSubcontext(javax.naming.Context ctx,
javax.naming.Name name)
Create a subcontext including any intermediate contexts. |
static javax.naming.Context |
createSubcontext(javax.naming.Context ctx,
java.lang.String name)
Create a subcontext including any intermediate contexts. |
static java.lang.Object |
lookup(javax.naming.Context context,
javax.naming.Name name,
java.lang.Class clazz)
Lookup an object in the given context |
static java.lang.Object |
lookup(javax.naming.Context context,
java.lang.String name,
java.lang.Class clazz)
Lookup an object in the given context |
static java.lang.Object |
lookup(javax.naming.Name name,
java.lang.Class clazz)
Lookup an object in the default initial context |
static java.lang.Object |
lookup(java.lang.String name,
java.lang.Class clazz)
Lookup an object in the default initial context |
static void |
rebind(javax.naming.Context ctx,
javax.naming.Name name,
java.lang.Object value)
Rebind val to name in ctx, and make sure that all intermediate contexts exist |
static void |
rebind(javax.naming.Context ctx,
java.lang.String name,
java.lang.Object value)
Rebind val to name in ctx, and make sure that all intermediate contexts exist |
static void |
unbind(javax.naming.Context ctx,
javax.naming.Name name)
Unbinds a name from ctx, and removes parents if they are empty |
static void |
unbind(javax.naming.Context ctx,
java.lang.String name)
Unbinds a name from ctx, and removes parents if they are empty |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Util()
Method Detail |
public static javax.naming.Context createSubcontext(javax.naming.Context ctx, java.lang.String name) throws javax.naming.NamingException
NamingException,
- on any JNDI failure
javax.naming.NamingException
public static javax.naming.Context createSubcontext(javax.naming.Context ctx, javax.naming.Name name) throws javax.naming.NamingException
NamingException,
- on any JNDI failure
javax.naming.NamingException
public static void bind(javax.naming.Context ctx, java.lang.String name, java.lang.Object value) throws javax.naming.NamingException
javax.naming.NamingException
public static void bind(javax.naming.Context ctx, javax.naming.Name name, java.lang.Object value) throws javax.naming.NamingException
javax.naming.NamingException
public static void rebind(javax.naming.Context ctx, java.lang.String name, java.lang.Object value) throws javax.naming.NamingException
javax.naming.NamingException
public static void rebind(javax.naming.Context ctx, javax.naming.Name name, java.lang.Object value) throws javax.naming.NamingException
javax.naming.NamingException
public static void unbind(javax.naming.Context ctx, java.lang.String name) throws javax.naming.NamingException
javax.naming.NamingException
public static void unbind(javax.naming.Context ctx, javax.naming.Name name) throws javax.naming.NamingException
javax.naming.NamingException
public static java.lang.Object lookup(java.lang.String name, java.lang.Class clazz) throws java.lang.Exception
name
- the name to lookupclazz
- the expected type
java.lang.Exception
- for any errorpublic static java.lang.Object lookup(javax.naming.Name name, java.lang.Class clazz) throws java.lang.Exception
name
- the name to lookupclazz
- the expected type
java.lang.Exception
- for any errorpublic static java.lang.Object lookup(javax.naming.Context context, java.lang.String name, java.lang.Class clazz) throws java.lang.Exception
context
- the contextname
- the name to lookupclazz
- the expected type
java.lang.Exception
- for any errorpublic static java.lang.Object lookup(javax.naming.Context context, javax.naming.Name name, java.lang.Class clazz) throws java.lang.Exception
context
- the contextname
- the name to lookupclazz
- the expected type
java.lang.Exception
- for any errorprotected static void checkObject(javax.naming.Context context, java.lang.String name, java.lang.Object object, java.lang.Class clazz) throws java.lang.Exception
context
- the contextname
- the name to lookupobject
- the objectclazz
- the expected type
java.lang.Exception
protected static void appendClassInfo(java.lang.StringBuffer buffer, java.lang.Class clazz)
buffer
- the buffer to append toclazz
- the class to describe
|
||||||||||
PREV CLASS (src) NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |