|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mortbay.jetty.plus.naming.NamingEntry
public abstract class 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)
Constructor |
Method Summary | |
---|---|
void |
bindToEnv()
Add a java:comp/env binding for the object represented by this NamingEntry |
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 |
static List |
lookupNamingEntries(int scopeType,
Class clazz)
Get all NameEntries of a certain type in a context. |
static NamingEntry |
lookupNamingEntry(int scopeType,
Class clazz,
String jndiName)
|
static void |
setScope(int scopeType)
|
void |
unbind()
Unbind this NamingEntry entirely |
void |
unbindEnv()
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 NamingEntry lookupNamingEntry(int scopeType, Class clazz, String jndiName) throws NamingException
NamingException
public static List lookupNamingEntries(int scopeType, Class clazz) throws NamingException
scopeType
- local or globalclazz
- the type of the entry
NamingException
public void bindToEnv() throws NamingException
NamingException
public void unbindEnv()
public void unbind()
public String getJndiName()
public Object getObjectToBind() throws NamingException
NamingException
public boolean isGlobal()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |