| java.lang.Object com.caucho.naming.ContextImpl
All known Subclasses: com.caucho.ejb.hessian.HessianContext, com.caucho.naming.mbean.MBeanContextImpl, com.caucho.naming.hessian.HessianContextImpl, com.caucho.naming.DirContextImpl, com.caucho.ejb.burlap.BurlapContext, com.caucho.naming.burlap.BurlapContextImpl,
ContextImpl | public class ContextImpl implements Context(Code) | | Resin's implementation of the JNDI Context . The actual storage
of the persistent data is in the AbstractModel .
The ContextImpl is just a Visitor around
the AbstractModel which also encapsulate
the JNDI environment.
In JNDI, each Context is a <model, env> pair.
Each client might pass a different environment
to the InitialContext so each ContextImpl
must be unique for each client. (Granted, this is a bit wasteful of
space which is why JNDI values should be cached.)
Applications which want a different model can still use
ContextImpl and specify the root
object for AbstractModel . ContextImpl will
take care of the JNDI API for the model.
|
Method Summary | |
public Object | addToEnvironment(String prop, Object value) Adds a property to the context environment. | public void | bind(String name, Object obj) Binds an object to the context. | public void | bind(Name name, Object obj) Binds an object to the context. | public void | close() Close is intended to free any transient data, like a cached
socket. | public String | composeName(String suffix, String prefix) | public Name | composeName(Name suffix, Name prefix) | protected ContextImpl | create(String name, AbstractModel model, Hashtable env) Creates a new instance of the ContextImpl . | final protected ContextImpl | create(AbstractModel model, Hashtable env) Creates a new ContextImpl when the name is irrelevant.
Parameters: model - the underlying storage node Parameters: env - the client's JNDI environment. | protected Context | createSingleSubcontext(String name) | public Context | createSubcontext(String name) Creates a subcontext for the current model. | public Context | createSubcontext(Name name) | protected void | destroySingleSubcontext(String name) | public void | destroySubcontext(String name) Destroys the named subcontext. | public void | destroySubcontext(Name name) | public Hashtable | getEnvironment() Returns the context environment. | protected String | getFullPath(String name) Returns the full name for the context. | protected String | getFullPath(Name name) Returns the full name for the context. | public AbstractModel | getModel() Returns the underlying storage node. | public String | getName() Returns the name. | public String | getNameInNamespace() | public NameParser | getNameParser(String name) | public NameParser | getNameParser(Name name) | protected char | getSeparator() | protected String | getSeparatorString() | public NamingEnumeration | list(String name) List the names for a context. | public NamingEnumeration | list(Name name) Lists the names for the context. | public NamingEnumeration | listBindings(String name) List the bindings for a context. | public NamingEnumeration | listBindings(Name name) Lists the bindings for the given name. | protected Iterator | listSingle() | public Object | lookup(String name) Looks up an object using its full string name. | public Object | lookup(Name name) Looks up an object with the given parsed JNDI name. | protected Object | lookupImpl(String name) Looks up an object using its full string name. | public Object | lookupLink(String name) Looks up an object given the name, but doesn't dereference links. | public Object | lookupLink(Name name) Looks up an object with the given parsed JNDI name, but don't
dereference the final object. | protected Object | lookupSingle(String name) Returns the object named by the single name segment.
Parameters: name - the name segment. | protected String | parseFirst(String name) | protected String | parseRest(String name) | public void | rebind(String name, Object obj) Binds an object to the context, overriding any old value. | public void | rebind(Name name, Object obj) | protected void | rebindSingle(String name, Object obj) | public Object | removeFromEnvironment(String prop) Removes a property from the context environment. | public void | rename(String oldName, String newName) | public void | rename(Name oldName, Name newName) | public String | toString() Returns a string value. | public void | unbind(String name) Unbinds an object from the context. | public void | unbind(Name name) | protected void | unbindSingle(String name) |
L | final protected static L10N L(Code) | | |
ContextImpl | public ContextImpl(AbstractModel model, Hashtable env)(Code) | | Creates a ContextImpl .
Parameters: model - The underlying storage node. Parameters: env - The client's JNDI environment. |
ContextImpl | public ContextImpl(String name, AbstractModel model, Hashtable env)(Code) | | Creates a ContextImpl .
Parameters: name - JNDI name, used for error messages, etc. Parameters: model - The underlying storage node. Parameters: env - The client's JNDI environment. |
close | public void close() throws NamingException(Code) | | Close is intended to free any transient data, like a cached
socket. It does not affect the JNDI tree.
|
create | protected ContextImpl create(String name, AbstractModel model, Hashtable env)(Code) | | Creates a new instance of the ContextImpl . Subclasses will
override this method to return a new instance of the subclass.
Parameters: name - the JNDI name for the new context Parameters: model - the underlying storage node Parameters: env - the client's JNDI environment. a new instance of the implementing class. |
create | final protected ContextImpl create(AbstractModel model, Hashtable env)(Code) | | Creates a new ContextImpl when the name is irrelevant.
Parameters: model - the underlying storage node Parameters: env - the client's JNDI environment. a new instance of the implementing class. |
getFullPath | protected String getFullPath(String name)(Code) | | Returns the full name for the context.
|
getFullPath | protected String getFullPath(Name name)(Code) | | Returns the full name for the context.
|
getSeparator | protected char getSeparator()(Code) | | |
getSeparatorString | protected String getSeparatorString()(Code) | | |
lookup | public Object lookup(String name) throws NamingException(Code) | | Looks up an object using its full string name. The path is searched
recursively. parseFirst returns the first segment. The
Parameters: name - the JNDI name to lookup for the child. the retrieved object |
lookupImpl | protected Object lookupImpl(String name) throws NamingException(Code) | | Looks up an object using its full string name. The path is searched
recursively. parseFirst returns the first segment. The
Parameters: name - the JNDI name to lookup for the child. the retrieved object |
lookupLink | public Object lookupLink(Name name) throws NamingException(Code) | | Looks up an object with the given parsed JNDI name, but don't
dereference the final object.
|
lookupSingle | protected Object lookupSingle(String name) throws NamingException(Code) | | Returns the object named by the single name segment.
Parameters: name - the name segment. the object bound to the context. |
rebind | public void rebind(String name, Object obj) throws NamingException(Code) | | Binds an object to the context, overriding any old value.
Parameters: name - the name to bind Parameters: obj - the object to bind |
toString | public String toString()(Code) | | Returns a string value.
|
unbind | public void unbind(String name) throws NamingException(Code) | | Unbinds an object from the context.
Parameters: name - the name to unbind |
|
|