|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.spice.jndikit.AbstractContext
org.codehaus.spice.jndikit.AbstractLocalContext
Abstract local JNDI Context that can be inherited from to provide a particular type of Context. These contexts are assumed to be on the same machine.
Field Summary |
Fields inherited from interface javax.naming.Context |
APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES |
Constructor Summary | |
AbstractLocalContext(Namespace namespace,
Hashtable environment,
Context parent)
|
Method Summary | |
protected void |
bind(Name name,
Object object,
boolean rebind)
Helper method to bind |
protected void |
checkUnbindContext(Name name,
Object entry)
|
protected abstract Context |
cloneContext()
|
void |
close()
Release resources associated with context. |
Context |
createSubcontext(Name name)
Create a Subcontext. |
void |
destroySubcontext(Name name)
|
protected abstract void |
doLocalBind(Name name,
Object object)
|
protected abstract NamingEnumeration |
doLocalList()
|
protected abstract NamingEnumeration |
doLocalListBindings()
|
protected abstract Object |
doLocalLookup(Name name)
Actually lookup raw entry in local context. |
protected abstract void |
doLocalUnbind(Name name)
Actually unbind raw entry in local context. |
String |
getNameInNamespace()
|
protected NameParser |
getNameParser()
|
protected Namespace |
getNamespace()
Utility method to retrieve the Namespace. |
protected Context |
getParent()
Utility method to retrieve parent Context. |
protected boolean |
isDestroyableContext(Object object)
|
NamingEnumeration |
list(Name name)
Enumerates the names bound in the named context. |
NamingEnumeration |
listBindings(Name name)
Enumerates the names bound in the named context, along with the objects bound to them. |
protected Object |
localLookup(Name name)
Lookup entry in local context. |
Object |
lookup(Name name)
Get the object named. |
protected Context |
lookupSubContext(Name name)
Lookup a sub-context of current context. |
protected abstract Context |
newContext()
|
void |
unbind(Name name)
Unbind a object from a name. |
Methods inherited from class org.codehaus.spice.jndikit.AbstractContext |
addToEnvironment, bind, bind, composeName, composeName, createSubcontext, destroySubcontext, getEnvironment, getLeafName, getNameParser, getNameParser, getPathName, getRawEnvironment, isSelf, list, listBindings, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, unbind |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractLocalContext(Namespace namespace, Hashtable environment, Context parent)
Method Detail |
protected final Context getParent()
protected final Namespace getNamespace()
protected boolean isDestroyableContext(Object object) throws NamingException
NamingException
protected abstract Context newContext() throws NamingException
NamingException
protected abstract Context cloneContext() throws NamingException
NamingException
protected void bind(Name name, Object object, boolean rebind) throws NamingException
bind
in class AbstractContext
NamingException
protected abstract void doLocalBind(Name name, Object object) throws NamingException
NamingException
public void close()
AbstractContext
close
in interface Context
close
in class AbstractContext
public Context createSubcontext(Name name) throws NamingException
name
- the name of subcontext
NamingException
- if an error occurs
(ie context exists, badly formated name etc)public void destroySubcontext(Name name) throws NamingException
NamingException
protected void checkUnbindContext(Name name, Object entry) throws NamingException
NamingException
public String getNameInNamespace() throws NamingException
NamingException
protected NameParser getNameParser() throws NamingException
getNameParser
in class AbstractContext
NamingException
public NamingEnumeration list(Name name) throws NamingException
name
- the name of the context
NamingException
- if an error occursprotected abstract NamingEnumeration doLocalList() throws NamingException
NamingException
protected abstract NamingEnumeration doLocalListBindings() throws NamingException
NamingException
public NamingEnumeration listBindings(Name name) throws NamingException
name
- the name of the context
NamingException
- if an error occurspublic Object lookup(Name name) throws NamingException
name
- the name
NamingException
- if an error occurs
(ie object name is inavlid or unbound)protected Object localLookup(Name name) throws NamingException
name
- the name in local context (size() == 1)
NamingException
- if an error occursprotected abstract Object doLocalLookup(Name name) throws NamingException
name
- the name in local context (size() == 1)
NamingException
- if an error occursprotected Context lookupSubContext(Name name) throws NamingException
name
- the name of subcontext
NamingException
- if an error occurs (like named entry is not a Context)public void unbind(Name name) throws NamingException
name
- the name
NamingException
- if an error occursprotected abstract void doLocalUnbind(Name name) throws NamingException
name
- the name in local context (size() == 1)
NamingException
- if an error occurs
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |