|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mortbay.jetty.plus.naming.NamingEntry
NamingEntry Base class for all jndi related entities. Instances of subclasses of this class are declared in jetty.xml or in a webapp's WEB-INF/jetty-env.xml file. NOTE: that all NamingEntries will be bound in a single namespace. The "global" level is just in the top level context. The "local" level is a context specific to a webapp.
Field Summary | |
protected String |
absoluteObjectNameString
|
protected Context |
context
|
protected boolean |
isGlobal
|
protected String |
jndiName
|
protected String |
namingEntryNameString
|
protected String |
objectNameString
|
protected Object |
objectToBind
|
protected static ThreadLocal |
scope
|
static int |
SCOPE_GLOBAL
|
static int |
SCOPE_LOCAL
|
Constructor Summary | |
NamingEntry(String jndiName,
Object object)
Create a NamingEntry. |
Method Summary | |
void |
bindToENC()
Add a java:comp/env binding for the object represented by this NamingEntry |
void |
bindToENC(String overrideName)
Add a java:comp/env binding for the object represented by this NamingEntry, but bind it as a different name to the one supplied |
static void |
bindToENC(String name,
String overrideName,
Class namingEntryType)
Bind a NamingEntry into JNDI. |
static boolean |
exists(int scopeType,
Class namingEntryType,
String jndiName)
Check to see if a NamingEntry exists in the given scope (local or global). |
String |
getJndiName()
Get the unique name of the object |
Object |
getObjectToBind()
Get the object that is to be bound |
static int |
getScope()
|
boolean |
isGlobal()
Check if this naming entry was global or locally scoped to a webapp |
boolean |
isLocal()
|
static List |
lookupNamingEntries(int scopeType,
Class clazz)
Get all NameEntries of a certain type in either the local or global namespace. |
static NamingEntry |
lookupNamingEntry(int scopeType,
Class clazz,
String jndiName)
Find a NamingEntry of the given scope. |
void |
release()
Unbind this NamingEntry entirely |
static void |
setScope(int scopeType)
|
void |
unbindENC()
Unbind this NamingEntry from a java:comp/env |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int SCOPE_GLOBAL
public static final int SCOPE_LOCAL
protected String jndiName
protected Object objectToBind
protected String absoluteObjectNameString
protected String namingEntryNameString
protected String objectNameString
protected Context context
protected boolean isGlobal
protected static ThreadLocal scope
Constructor Detail |
public NamingEntry(String jndiName, Object object) throws NamingException
jndiName
- the name of the object which will eventually be in java:comp/envobject
- the object to be bound
NamingException
Method Detail |
public static void setScope(int scopeType)
public static int getScope()
public static void bindToENC(String name, String overrideName, Class namingEntryType) throws NamingException
name
- the name of the NamingEntry from the runtime environmentoverrideName
- the name it should be bound as into java:comp/envnamingEntryType
-
NamingException
public static boolean exists(int scopeType, Class namingEntryType, String jndiName)
scopeType
- local or globalnamingEntryType
- the type of the NamingEntryjndiName
- the name in jndi
public static NamingEntry lookupNamingEntry(int scopeType, Class clazz, String jndiName) throws NamingException
scopeType
- local or globalclazz
- the type of the value stored by the NamingEntryjndiName
- the name in jndi
NamingException
public static List lookupNamingEntries(int scopeType, Class clazz) throws NamingException
scopeType
- local or globalclazz
- the type of the entry
NamingException
public void bindToENC() throws NamingException
NamingException
public void bindToENC(String overrideName) throws NamingException
NamingException
public void unbindENC()
public void release()
public String getJndiName()
public Object getObjectToBind() throws NamingException
NamingException
public boolean isGlobal()
public boolean isLocal()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |