org.apache.xbean.naming.context
Class WritableContext.NestedWritableContext

java.lang.Object
  extended by org.apache.xbean.naming.context.AbstractContext
      extended by org.apache.xbean.naming.context.AbstractFederatedContext
          extended by org.apache.xbean.naming.context.WritableContext.NestedWritableContext
All Implemented Interfaces:
java.io.Serializable, javax.naming.Context, NestedContextFactory
Enclosing class:
WritableContext

public class WritableContext.NestedWritableContext
extends AbstractFederatedContext

Nested context which shares the absolute index map in MapContext.

See Also:
Serialized Form

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
WritableContext.NestedWritableContext(java.lang.String path, java.util.Map<java.lang.String,java.lang.Object> bindings)
           
 
Method Summary
protected  boolean addBinding(java.lang.String name, java.lang.Object value, boolean rebind)
           
 javax.naming.Context createNestedSubcontext(java.lang.String path, java.util.Map<java.lang.String,java.lang.Object> bindings)
          Creates a nested subcontext instance.
protected  java.lang.Object getDeepBinding(java.lang.String name)
          Gets the object bound to the name.
protected  java.util.Map<java.lang.String,java.lang.Object> getWrapperBindings()
           
protected  boolean removeBinding(java.lang.String name, boolean removeNotEmptyContext)
          Removes the binding from the context.
 
Methods inherited from class org.apache.xbean.naming.context.AbstractFederatedContext
addFederatedContext, faultLookup, getBinding, getBindings, getBindings, getMasterContext, isNestedSubcontext, removeFederatedContext
 
Methods inherited from class org.apache.xbean.naming.context.AbstractContext
addBinding, addDeepBinding, addToEnvironment, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, createSubcontextTree, destroySubcontext, destroySubcontext, getContextAccess, getEnvironment, getNameInNamespace, getNameInNamespace, getNameInNamespace, getNameParser, getNameParser, getNameParser, getParsedNameInNamespace, getSize, isEmpty, list, list, list, listBindings, listBindings, listBindings, lookup, lookup, lookup, lookupFinalContext, lookupLink, lookupLink, rebind, rebind, removeDeepBinding, removeDeepBinding, removeFromEnvironment, rename, rename, unbind, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WritableContext.NestedWritableContext

public WritableContext.NestedWritableContext(java.lang.String path,
                                             java.util.Map<java.lang.String,java.lang.Object> bindings)
                                      throws javax.naming.NamingException
Throws:
javax.naming.NamingException
Method Detail

createNestedSubcontext

public javax.naming.Context createNestedSubcontext(java.lang.String path,
                                                   java.util.Map<java.lang.String,java.lang.Object> bindings)
                                            throws javax.naming.NamingException
Description copied from interface: NestedContextFactory
Creates a nested subcontext instance. This does not cause the nested context to be bound.

Parameters:
path - the path to the new nested context
bindings - the initial bindings for the context
Returns:
the new nested context
Throws:
javax.naming.NamingException - on error

getDeepBinding

protected java.lang.Object getDeepBinding(java.lang.String name)
Description copied from class: AbstractContext
Gets the object bound to the name. The name may contain slashes.

Overrides:
getDeepBinding in class AbstractFederatedContext
Parameters:
name - the name
Returns:
the object bound to the name, or null if not found

getWrapperBindings

protected java.util.Map<java.lang.String,java.lang.Object> getWrapperBindings()
                                                                       throws javax.naming.NamingException
Specified by:
getWrapperBindings in class AbstractFederatedContext
Throws:
javax.naming.NamingException

addBinding

protected boolean addBinding(java.lang.String name,
                             java.lang.Object value,
                             boolean rebind)
                      throws javax.naming.NamingException
Overrides:
addBinding in class AbstractFederatedContext
Throws:
javax.naming.NamingException

removeBinding

protected boolean removeBinding(java.lang.String name,
                                boolean removeNotEmptyContext)
                         throws javax.naming.NamingException
Description copied from class: AbstractContext
Removes the binding from the context. The name will not contain a path and the value will not be a nested context although it may be a foreign context.

Overrides:
removeBinding in class AbstractFederatedContext
Parameters:
name - name under which the value should be bound
removeNotEmptyContext - ??? TODO figure this out
Returns:
whether removal was successful
Throws:
javax.naming.NamingException - if a problem occurs during the bind such as a value already being bound


Copyright © 2005-2011. All Rights Reserved.