org.apache.avalon.excalibur.naming
Class RemoteContext
java.lang.Object
|
+--org.apache.avalon.excalibur.naming.AbstractContext
|
+--org.apache.avalon.excalibur.naming.RemoteContext
- All Implemented Interfaces:
- javax.naming.Context, java.io.Serializable
- public class RemoteContext
- extends AbstractContext
- implements java.io.Serializable
Context that hooks up to a remote source.
- Version:
- $Revision: 1.2 $
- Author:
- Peter Donald
- See Also:
- Serialized Form
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 |
Method Summary |
protected void |
bind(javax.naming.Name name,
java.lang.Object object,
boolean rebind)
Helper method to bind |
void |
close()
Release resources associated with context. |
javax.naming.Context |
createSubcontext(javax.naming.Name name)
Create a Subcontext. |
void |
destroySubcontext(javax.naming.Name name)
|
protected void |
fillInContext(javax.naming.Context object)
|
protected javax.naming.Name |
getAbsoluteName(javax.naming.Name name)
|
java.lang.String |
getNameInNamespace()
|
protected javax.naming.NameParser |
getNameParser()
|
protected Namespace |
getNamespace()
|
protected NamingProvider |
getProvider()
|
protected javax.naming.NamingException |
handleException(java.lang.Exception e)
|
javax.naming.NamingEnumeration |
list(javax.naming.Name name)
Enumerates the names bound in the named context. |
javax.naming.NamingEnumeration |
listBindings(javax.naming.Name name)
Enumerates the names bound in the named context, along with the objects bound to them. |
java.lang.Object |
lookup(javax.naming.Name name)
Get the object named. |
void |
unbind(javax.naming.Name name)
Unbind a object from a name. |
Methods inherited from class org.apache.avalon.excalibur.naming.AbstractContext |
addToEnvironment, bind, bind, composeName, composeName, createSubcontext, destroySubcontext, getEnvironment, getLeafName, getNameParser, getNameParser, getPathName, 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 |
NAMESPACE_NAME
public static final java.lang.String NAMESPACE_NAME
NAMESPACE
public static final java.lang.String NAMESPACE
NAMING_PROVIDER
public static final java.lang.String NAMING_PROVIDER
m_provider
protected transient NamingProvider m_provider
m_nameParser
protected transient javax.naming.NameParser m_nameParser
m_namespace
protected transient Namespace m_namespace
m_baseName
protected javax.naming.Name m_baseName
RemoteContext
public RemoteContext()
RemoteContext
public RemoteContext(java.util.Hashtable environment,
javax.naming.Name baseName)
throws javax.naming.NamingException
bind
protected void bind(javax.naming.Name name,
java.lang.Object object,
boolean rebind)
throws javax.naming.NamingException
- Helper method to bind
- Overrides:
bind
in class AbstractContext
close
public void close()
- Release resources associated with context.
- Overrides:
close
in class AbstractContext
createSubcontext
public javax.naming.Context createSubcontext(javax.naming.Name name)
throws javax.naming.NamingException
- Create a Subcontext.
- Parameters:
name
- the name of subcontext- Returns:
- the created context
- Throws:
javax.naming.NamingException
- if an error occurs (ie context exists, badly formated name etc)
destroySubcontext
public void destroySubcontext(javax.naming.Name name)
throws javax.naming.NamingException
getNameInNamespace
public java.lang.String getNameInNamespace()
throws javax.naming.NamingException
list
public javax.naming.NamingEnumeration list(javax.naming.Name name)
throws javax.naming.NamingException
- Enumerates the names bound in the named context.
- Parameters:
name
- the name of the context- Returns:
- the enumeration
- Throws:
javax.naming.NamingException
- if an error occurs
listBindings
public javax.naming.NamingEnumeration listBindings(javax.naming.Name name)
throws javax.naming.NamingException
- Enumerates the names bound in the named context, along with the objects bound to them.
- Parameters:
name
- the name of the context- Returns:
- the enumeration
- Throws:
javax.naming.NamingException
- if an error occurs
lookup
public java.lang.Object lookup(javax.naming.Name name)
throws javax.naming.NamingException
- Get the object named.
- Parameters:
name
- the name- Returns:
- the object
- Throws:
javax.naming.NamingException
- if an error occurs (ie object name is inavlid or unbound)
unbind
public void unbind(javax.naming.Name name)
throws javax.naming.NamingException
- Unbind a object from a name.
- Parameters:
name
- the name- Throws:
javax.naming.NamingException
- if an error occurs
fillInContext
protected void fillInContext(javax.naming.Context object)
throws javax.naming.NamingException
getNamespace
protected Namespace getNamespace()
throws javax.naming.NamingException
getProvider
protected NamingProvider getProvider()
throws javax.naming.NamingException
getNameParser
protected javax.naming.NameParser getNameParser()
throws javax.naming.NamingException
- Overrides:
getNameParser
in class AbstractContext
getAbsoluteName
protected javax.naming.Name getAbsoluteName(javax.naming.Name name)
throws javax.naming.NamingException
handleException
protected javax.naming.NamingException handleException(java.lang.Exception e)
Copyright © 1999-2004 The OpenJMS Group. All Rights Reserved.