|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.util.naming.Util
public class Util
A static utility class for common JNDI operations.
| Constructor Summary | |
|---|---|
Util()
|
|
| Method Summary | |
|---|---|
protected static void |
appendClassInfo(StringBuffer buffer,
Class clazz)
Append Class Info |
static void |
bind(Context ctx,
Name name,
Object value)
Bind val to name in ctx, and make sure that all intermediate contexts exist |
static void |
bind(Context ctx,
String name,
Object value)
Bind val to name in ctx, and make sure that all intermediate contexts exist |
protected static void |
checkObject(Context context,
String name,
Object object,
Class clazz)
Checks an object implements the given class |
static void |
createLinkRef(Context ctx,
String fromName,
String toName)
Create a link |
static void |
createLinkRef(String fromName,
String toName)
Create a link |
static Context |
createSubcontext(Context ctx,
Name name)
Create a subcontext including any intermediate contexts. |
static Context |
createSubcontext(Context ctx,
String name)
Create a subcontext including any intermediate contexts. |
static Object |
lookup(Context context,
Name name,
Class clazz)
Lookup an object in the given context |
static Object |
lookup(Context context,
String name,
Class clazz)
Lookup an object in the given context |
static Object |
lookup(Name name,
Class clazz)
Lookup an object in the default initial context |
static Object |
lookup(String name,
Class clazz)
Lookup an object in the default initial context |
static void |
rebind(Context ctx,
Name name,
Object value)
Rebind val to name in ctx, and make sure that all intermediate contexts exist |
static void |
rebind(Context ctx,
String name,
Object value)
Rebind val to name in ctx, and make sure that all intermediate contexts exist |
static void |
removeLinkRef(Context ctx,
String name)
Remove the link ref |
static void |
removeLinkRef(String name)
Remove the link ref |
static void |
unbind(Context ctx,
Name name)
Unbinds a name from ctx, and removes parents if they are empty |
static void |
unbind(Context ctx,
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 Context createSubcontext(Context ctx,
String name)
throws NamingException
ctx, - the parent JNDI Context under which value will be boundname, - the name relative to ctx of the subcontext.
NamingException - on any JNDI failure
public static Context createSubcontext(Context ctx,
Name name)
throws NamingException
ctx, - the parent JNDI Context under which value will be boundname, - the name relative to ctx of the subcontext.
NamingException - on any JNDI failure
public static void bind(Context ctx,
String name,
Object value)
throws NamingException
ctx, - the parent JNDI Context under which value will be boundname, - the name relative to ctx where value will be boundvalue, - the value to bind.
NamingException
public static void bind(Context ctx,
Name name,
Object value)
throws NamingException
ctx, - the parent JNDI Context under which value will be boundname, - the name relative to ctx where value will be boundvalue, - the value to bind.
NamingException
public static void rebind(Context ctx,
String name,
Object value)
throws NamingException
ctx, - the parent JNDI Context under which value will be boundname, - the name relative to ctx where value will be boundvalue, - the value to bind.
NamingException
public static void rebind(Context ctx,
Name name,
Object value)
throws NamingException
ctx, - the parent JNDI Context under which value will be boundname, - the name relative to ctx where value will be boundvalue, - the value to bind.
NamingException
public static void unbind(Context ctx,
String name)
throws NamingException
ctx, - the parent JNDI Context under which the name will be unboundname, - The name to unbind
NamingException
public static void unbind(Context ctx,
Name name)
throws NamingException
ctx, - the parent JNDI Context under which the name will be unboundname, - The name to unbind
NamingException
public static Object lookup(String name,
Class clazz)
throws Exception
name - the name to lookupclazz - the expected type
Exception - for any error
public static Object lookup(Name name,
Class clazz)
throws Exception
name - the name to lookupclazz - the expected type
Exception - for any error
public static Object lookup(Context context,
String name,
Class clazz)
throws Exception
context - the contextname - the name to lookupclazz - the expected type
Exception - for any error
public static Object lookup(Context context,
Name name,
Class clazz)
throws Exception
context - the contextname - the name to lookupclazz - the expected type
Exception - for any error
public static void createLinkRef(String fromName,
String toName)
throws NamingException
fromName - the from nametoName - the to name
NamingException - for any error
public static void createLinkRef(Context ctx,
String fromName,
String toName)
throws NamingException
ctx - the contextfromName - the from nametoName - the to name
NamingException - for any error
public static void removeLinkRef(String name)
throws NamingException
name - the name of the link binding
NamingException - for any error
public static void removeLinkRef(Context ctx,
String name)
throws NamingException
ctx - the contextname - the name of the link binding
NamingException - for any error
protected static void checkObject(Context context,
String name,
Object object,
Class clazz)
throws Exception
context - the contextname - the name to lookupobject - the objectclazz - the expected type
Exception
protected static void appendClassInfo(StringBuffer buffer,
Class clazz)
buffer - the buffer to append toclazz - the class to describe
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||