com.resilientedge.util.prefs
Class SystemContext

java.lang.Object
  |
  +--com.resilientedge.util.naming.AbstractCtx
        |
        +--com.resilientedge.util.naming.AbstractSimpleCtx
              |
              +--com.resilientedge.util.prefs.SystemContext
All Implemented Interfaces:
javax.naming.Context, ContextAncestors, javax.naming.event.EventContext

public class SystemContext
extends AbstractSimpleCtx

The PreferenceCtx is used to supply preferences for application configuration.

This Context has its own bindings and can pass on its lookup requests to other Contexts that have been installed under this one using the addContext() method. When Contexts are installed under this one the subcontexts do not extend the name space.

Author:
jgardner
See Also:
Preferences, PreferencesCtx

Fields inherited from interface javax.naming.event.EventContext
OBJECT_SCOPE, ONELEVEL_SCOPE, SUBTREE_SCOPE
 
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
SystemContext()
          Construct a PreferenceCtx.
SystemContext(javax.naming.Context parent, java.util.Hashtable env)
          Construct a PreferenceCtx with an environment and parent Context.
SystemContext(java.util.Hashtable env)
          Construct a PreferenceCtx with an environment.
 
Method Summary
protected  void bind_internal(javax.naming.Name name, java.lang.Object obj)
          Put the name in your bindings.
protected  javax.naming.Context cloneCtx()
           
protected  javax.naming.NameParser getNameParser()
           
 javax.naming.NamingEnumeration list(javax.naming.Name name)
           
 javax.naming.NamingEnumeration listBindings(javax.naming.Name name)
           
protected  java.lang.Object lookup_internal(javax.naming.Name name)
          Lookup the name in your bindings.
protected  java.lang.Object rebind_internal(javax.naming.Name name, java.lang.Object obj)
          Rebind a new Object to a name.
protected  java.lang.Object unbind_internal(javax.naming.Name name)
          The name can not actually be unbound since there is no way to remove a property name so the value is set to an empty String.
 
Methods inherited from class com.resilientedge.util.naming.AbstractSimpleCtx
bind, lookup, lookupLink, parseNameComponents, rebind, rename, unbind
 
Methods inherited from class com.resilientedge.util.naming.AbstractCtx
addNamingListener, addNamingListener, addToEnvironment, bind, close, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, fireObjectChangeEvent, getEnvironment, getNameInNamespace, getNameParser, getNameParser, getParentContext, getRootContext, list, listBindings, lookup, lookupLink, rebind, removeFromEnvironment, removeNamingListener, rename, setParentContext, targetMustExist, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemContext

public SystemContext()
Construct a PreferenceCtx.

SystemContext

public SystemContext(java.util.Hashtable env)
              throws javax.naming.NamingException
Construct a PreferenceCtx with an environment.
Parameters:
env - Parameter Description
Throws:
javax.naming.NamingException - Exception Description

SystemContext

public SystemContext(javax.naming.Context parent,
                     java.util.Hashtable env)
              throws javax.naming.NamingException
Construct a PreferenceCtx with an environment and parent Context.
Parameters:
parent - Parameter Description
env - Parameter Description
Throws:
javax.naming.NamingException - Exception Description
Method Detail

list

public javax.naming.NamingEnumeration list(javax.naming.Name name)
                                    throws javax.naming.NamingException
Parameters:
name - Parameter Description
Returns:
Returned Value Description
Throws:
javax.naming.NamingException - Exception Description

listBindings

public javax.naming.NamingEnumeration listBindings(javax.naming.Name name)
                                            throws javax.naming.NamingException
Parameters:
name - Parameter Description
Returns:
Returned Value Description
Throws:
javax.naming.NamingException - Exception Description

getNameParser

protected javax.naming.NameParser getNameParser()
                                         throws javax.naming.NamingException
Overrides:
getNameParser in class AbstractCtx
Returns:
The NameParser value
Throws:
javax.naming.NamingException - Exception Description

lookup_internal

protected java.lang.Object lookup_internal(javax.naming.Name name)
                                    throws javax.naming.NamingException
Description copied from class: AbstractSimpleCtx
Lookup the name in your bindings. Throw NameNotFoundException if it does not exist.
Overrides:
lookup_internal in class AbstractSimpleCtx
Parameters:
name - Parameter Description
Returns:
Returned Value Description
Throws:
javax.naming.NamingException - Exception Description

bind_internal

protected void bind_internal(javax.naming.Name name,
                             java.lang.Object obj)
                      throws javax.naming.NamingException
Description copied from class: AbstractSimpleCtx
Put the name in your bindings. The caller has already called lookup_internal on the name so this does not need to be done again.
Overrides:
bind_internal in class AbstractSimpleCtx
Parameters:
name - Parameter Description
obj - Parameter Description
Throws:
javax.naming.NamingException - Exception Description

rebind_internal

protected java.lang.Object rebind_internal(javax.naming.Name name,
                                           java.lang.Object obj)
                                    throws javax.naming.NamingException
Description copied from class: AbstractSimpleCtx
Rebind a new Object to a name. If the name does not exist then bind it anyway.
Overrides:
rebind_internal in class AbstractSimpleCtx
Parameters:
name - Parameter Description
obj - Parameter Description
Returns:
Returned Value Description
Throws:
javax.naming.NamingException - Exception Description

unbind_internal

protected java.lang.Object unbind_internal(javax.naming.Name name)
                                    throws javax.naming.NamingException
The name can not actually be unbound since there is no way to remove a property name so the value is set to an empty String.
Overrides:
unbind_internal in class AbstractSimpleCtx
Parameters:
name - Parameter Description
Returns:
Returned Value Description
Throws:
javax.naming.NamingException - Exception Description

cloneCtx

protected javax.naming.Context cloneCtx()
                                 throws javax.naming.NamingException
Overrides:
cloneCtx in class AbstractSimpleCtx
Returns:
Returned Value Description
Throws:
javax.naming.NamingException - Exception Description


Copyright © 2001 Resilient Edge, Inc. All Rights Reserved.