org.apache.avalon.excalibur.naming
クラス AbstractContext

java.lang.Object
  |
  +--org.apache.avalon.excalibur.naming.AbstractContext
すべての実装インタフェース:
javax.naming.Context
直系の既知のサブクラス:
AbstractLocalContext, AbstractURLContext, RemoteContext

public abstract class AbstractContext
extends java.lang.Object
implements javax.naming.Context

Abstract JNDI Context that can be inherited from to provide a particular type of Context.

バージョン:
$Revision: 1.4 $
作成者:
Peter Donald

インタフェース 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
 
コンストラクタの概要
AbstractContext()
           
AbstractContext(java.util.Hashtable environment)
           
 
メソッドの概要
 java.lang.Object addToEnvironment(java.lang.String key, java.lang.Object value)
          Add a key-value pair to environment
 void bind(javax.naming.Name name, java.lang.Object object)
          Bind an object to a name.
protected abstract  void bind(javax.naming.Name name, java.lang.Object object, boolean rebind)
          Helper method to bind
 void bind(java.lang.String name, java.lang.Object object)
          Bind an object to a name.
 void close()
          Release resources associated with context.
 javax.naming.Name composeName(javax.naming.Name name, javax.naming.Name prefix)
          Compose a name form a name and a prefix.
 java.lang.String composeName(java.lang.String name, java.lang.String prefix)
          Compose a name form a name and a prefix.
 javax.naming.Context createSubcontext(java.lang.String name)
          Create a Subcontext.
 void destroySubcontext(java.lang.String name)
          Destroy a Subcontext.
 java.util.Hashtable getEnvironment()
          Return a copy of environment.
protected  javax.naming.Name getLeafName(javax.naming.Name name)
          Get leaf name component from specified Name object.
protected abstract  javax.naming.NameParser getNameParser()
           
 javax.naming.NameParser getNameParser(javax.naming.Name name)
          Get the NameParser for the named context.
 javax.naming.NameParser getNameParser(java.lang.String name)
          Get the NameParser for the named context.
protected  javax.naming.Name getPathName(javax.naming.Name name)
          Get name components minus leaf name component.
protected  java.util.Hashtable getRawEnvironment()
          Utility method to retrieve raw environment value.
protected  boolean isSelf(javax.naming.Name name)
           
 javax.naming.NamingEnumeration list(java.lang.String name)
          Enumerates the names bound in the named context, along with the objects bound to them.
 javax.naming.NamingEnumeration listBindings(java.lang.String name)
          Enumerates the names bound in the named context, along with the objects bound to them.
 java.lang.Object lookup(java.lang.String name)
          Get the object named.
 java.lang.Object lookupLink(javax.naming.Name name)
          Get the object named following all links.
 java.lang.Object lookupLink(java.lang.String name)
          Get the object named following all links.
 void rebind(javax.naming.Name name, java.lang.Object object)
          Binds a name to an object, overwriting any existing binding.
 void rebind(java.lang.String name, java.lang.Object object)
          Binds a name to an object, overwriting any existing binding.
 java.lang.Object removeFromEnvironment(java.lang.String key)
          Remove a key-value pair form environment and return it.
 void rename(javax.naming.Name oldName, javax.naming.Name newName)
           
 void rename(java.lang.String oldName, java.lang.String newName)
          Rename a already bound object
 void unbind(java.lang.String name)
          Unbind a object from a name.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
インタフェース javax.naming.Context から継承したメソッド
createSubcontext, destroySubcontext, getNameInNamespace, list, listBindings, lookup, unbind
 

コンストラクタの詳細

AbstractContext

public AbstractContext()

AbstractContext

public AbstractContext(java.util.Hashtable environment)
メソッドの詳細

getNameParser

protected abstract javax.naming.NameParser getNameParser()
                                                  throws javax.naming.NamingException

addToEnvironment

public java.lang.Object addToEnvironment(java.lang.String key,
                                         java.lang.Object value)
                                  throws javax.naming.NamingException
Add a key-value pair to environment
定義:
インタフェース javax.naming.Context 内の addToEnvironment
パラメータ:
key - the key
value - the value
戻り値:
the value

close

public void close()
Release resources associated with context.
定義:
インタフェース javax.naming.Context 内の close

isSelf

protected boolean isSelf(javax.naming.Name name)

bind

public void bind(java.lang.String name,
                 java.lang.Object object)
          throws javax.naming.NamingException
Bind an object to a name.
定義:
インタフェース javax.naming.Context 内の bind
パラメータ:
name - the name to bind to
object - the object
例外:
javax.naming.NamingException - if an error occurs such as bad name or invalid binding

bind

public void bind(javax.naming.Name name,
                 java.lang.Object object)
          throws javax.naming.NamingException
Bind an object to a name.
定義:
インタフェース javax.naming.Context 内の bind
パラメータ:
name - the name to bind to
object - the object
例外:
javax.naming.NamingException - if an error occurs such as bad name or invalid binding

bind

protected abstract void bind(javax.naming.Name name,
                             java.lang.Object object,
                             boolean rebind)
                      throws javax.naming.NamingException
Helper method to bind

composeName

public java.lang.String composeName(java.lang.String name,
                                    java.lang.String prefix)
                             throws javax.naming.NamingException
Compose a name form a name and a prefix.
定義:
インタフェース javax.naming.Context 内の composeName
パラメータ:
name - the name
prefix - the prefix
戻り値:
the composed name
例外:
javax.naming.NamingException - if a badly formatted name for context

composeName

public javax.naming.Name composeName(javax.naming.Name name,
                                     javax.naming.Name prefix)
                              throws javax.naming.NamingException
Compose a name form a name and a prefix.
定義:
インタフェース javax.naming.Context 内の composeName
パラメータ:
name - the name
prefix - the prefix
戻り値:
the composed name
例外:
javax.naming.NamingException - if a badly formatted name for context

createSubcontext

public javax.naming.Context createSubcontext(java.lang.String name)
                                      throws javax.naming.NamingException
Create a Subcontext.
定義:
インタフェース javax.naming.Context 内の createSubcontext
パラメータ:
name - the name of subcontext
戻り値:
the created context
例外:
javax.naming.NamingException - if an error occurs (ie context exists, badly formated name etc)

destroySubcontext

public void destroySubcontext(java.lang.String name)
                       throws javax.naming.NamingException
Destroy a Subcontext.
定義:
インタフェース javax.naming.Context 内の destroySubcontext
パラメータ:
name - the name of subcontext to destroy
例外:
javax.naming.NamingException - if an error occurs such as malformed name or context not exiting or not empty

getEnvironment

public java.util.Hashtable getEnvironment()
                                   throws javax.naming.NamingException
Return a copy of environment.
定義:
インタフェース javax.naming.Context 内の getEnvironment
戻り値:
the environment

getNameParser

public javax.naming.NameParser getNameParser(java.lang.String name)
                                      throws javax.naming.NamingException
Get the NameParser for the named context.
定義:
インタフェース javax.naming.Context 内の getNameParser
パラメータ:
name -  
戻り値:
the NameParser
例外:
javax.naming.NamingException - if an error occurs

getNameParser

public javax.naming.NameParser getNameParser(javax.naming.Name name)
                                      throws javax.naming.NamingException
Get the NameParser for the named context.
定義:
インタフェース javax.naming.Context 内の getNameParser
パラメータ:
name -  
戻り値:
the NameParser
例外:
javax.naming.NamingException - if an error occurs

list

public javax.naming.NamingEnumeration list(java.lang.String name)
                                    throws javax.naming.NamingException
Enumerates the names bound in the named context, along with the objects bound to them.
定義:
インタフェース javax.naming.Context 内の list
パラメータ:
name - the name of the context
戻り値:
the enumeration
例外:
javax.naming.NamingException - if an error occurs

listBindings

public javax.naming.NamingEnumeration listBindings(java.lang.String name)
                                            throws javax.naming.NamingException
Enumerates the names bound in the named context, along with the objects bound to them.
定義:
インタフェース javax.naming.Context 内の listBindings
パラメータ:
name - the name of the context
戻り値:
the enumeration
例外:
javax.naming.NamingException - if an error occurs

lookup

public java.lang.Object lookup(java.lang.String name)
                        throws javax.naming.NamingException
Get the object named.
定義:
インタフェース javax.naming.Context 内の lookup
パラメータ:
name - the name
戻り値:
the object
例外:
javax.naming.NamingException - if an error occurs (ie object name is inavlid or unbound)

lookupLink

public java.lang.Object lookupLink(java.lang.String name)
                            throws javax.naming.NamingException
Get the object named following all links.
定義:
インタフェース javax.naming.Context 内の lookupLink
パラメータ:
name - the name
戻り値:
the object
例外:
javax.naming.NamingException - if an error occurs (ie object name is inavlid or unbound)

lookupLink

public java.lang.Object lookupLink(javax.naming.Name name)
                            throws javax.naming.NamingException
Get the object named following all links.
定義:
インタフェース javax.naming.Context 内の lookupLink
パラメータ:
name - the name
戻り値:
the object
例外:
javax.naming.NamingException - if an error occurs (ie object name is inavlid or unbound)

rebind

public void rebind(java.lang.String name,
                   java.lang.Object object)
            throws javax.naming.NamingException
Binds a name to an object, overwriting any existing binding.
定義:
インタフェース javax.naming.Context 内の rebind
パラメータ:
name - the name
object - the object
例外:
javax.naming.NamingException - if an error occurs

rebind

public void rebind(javax.naming.Name name,
                   java.lang.Object object)
            throws javax.naming.NamingException
Binds a name to an object, overwriting any existing binding.
定義:
インタフェース javax.naming.Context 内の rebind
パラメータ:
name - the name
object - the object
例外:
javax.naming.NamingException - if an error occurs

removeFromEnvironment

public java.lang.Object removeFromEnvironment(java.lang.String key)
                                       throws javax.naming.NamingException
Remove a key-value pair form environment and return it.
定義:
インタフェース javax.naming.Context 内の removeFromEnvironment
パラメータ:
key - the key
戻り値:
the value

rename

public void rename(java.lang.String oldName,
                   java.lang.String newName)
            throws javax.naming.NamingException
Rename a already bound object
定義:
インタフェース javax.naming.Context 内の rename
パラメータ:
oldName - the old name
newName - the new name
例外:
javax.naming.NamingException - if an error occurs

rename

public void rename(javax.naming.Name oldName,
                   javax.naming.Name newName)
            throws javax.naming.NamingException
定義:
インタフェース javax.naming.Context 内の rename

unbind

public void unbind(java.lang.String name)
            throws javax.naming.NamingException
Unbind a object from a name.
定義:
インタフェース javax.naming.Context 内の unbind
パラメータ:
name - the name
例外:
javax.naming.NamingException - if an error occurs

getRawEnvironment

protected final java.util.Hashtable getRawEnvironment()
Utility method to retrieve raw environment value. This means that null will be returned if the value is null.
戻り値:
the environment hashtable or null

getPathName

protected javax.naming.Name getPathName(javax.naming.Name name)
                                 throws javax.naming.NamingException
Get name components minus leaf name component.
パラメータ:
name - the name elements leading up to last element
戻り値:
the name
例外:
javax.naming.NamingException - if an error occurs

getLeafName

protected javax.naming.Name getLeafName(javax.naming.Name name)
                                 throws javax.naming.NamingException
Get leaf name component from specified Name object.
パラメータ:
name - the name to retrieve leaf from
戻り値:
the leaf name component
例外:
javax.naming.NamingException - if an error occurs


"Copyright ? 2001 Apache Jakarta Project. All Rights Reserved."