Package org.apache.xbean.naming.context
Class AbstractFederatedContext
java.lang.Object
org.apache.xbean.naming.context.AbstractContext
org.apache.xbean.naming.context.AbstractFederatedContext
- All Implemented Interfaces:
Serializable,Context,NestedContextFactory
- Direct Known Subclasses:
ImmutableFederatedContext,ImmutableFederatedContext.NestedImmutableFederatedContext,WritableContext,WritableContext.NestedWritableContext
- Version:
- $Rev$ $Date$
- See Also:
-
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
ConstructorsConstructorDescriptionAbstractFederatedContext(String nameInNamespace) AbstractFederatedContext(String nameInNamespace, ContextAccess contextAccess) AbstractFederatedContext(String nameInNamespace, ContextAccess contextAccess, Set<Context> federatedContexts) AbstractFederatedContext(AbstractFederatedContext masterContext, String nameInNamespace) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanaddBinding(String name, Object value, boolean rebind) protected static voidaddFederatedContext(AbstractFederatedContext wrappingContext, Context innerContext) protected ObjectfaultLookup(String stringName, Name parsedName) When a value can not be found within this context, this method is called as a last ditch effort befrore thowing a null pointer exception.protected ObjectgetBinding(String name) Gets the object bound to the name.Gets a map of the bindings for the current node (i.e., no names with slashes).getBindings(String name) protected ObjectgetDeepBinding(String name) Gets the object bound to the name.protected AbstractFederatedContextbooleanisNestedSubcontext(Object value) Is the specified value an instance of a nested contextprotected booleanremoveBinding(String name, boolean removeNotEmptyContext) Removes the binding from the context.protected static voidremoveFederatedContext(AbstractFederatedContext wrappingContext, Context innerContext) 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, unbindMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.xbean.naming.context.NestedContextFactory
createNestedSubcontext
-
Constructor Details
-
AbstractFederatedContext
public AbstractFederatedContext() -
AbstractFederatedContext
-
AbstractFederatedContext
-
AbstractFederatedContext
public AbstractFederatedContext(String nameInNamespace, ContextAccess contextAccess, Set<Context> federatedContexts) -
AbstractFederatedContext
public AbstractFederatedContext(AbstractFederatedContext masterContext, String nameInNamespace) throws NamingException - Throws:
NamingException
-
-
Method Details
-
faultLookup
Description copied from class:AbstractContextWhen a value can not be found within this context, this method is called as a last ditch effort befrore thowing a null pointer exception.- Overrides:
faultLookupin classAbstractContext- Parameters:
stringName- the string version of the name; will not be nullparsedName- the parsed name; will not be null- Returns:
- the value or null if no fault value could be found
-
getDeepBinding
Description copied from class:AbstractContextGets the object bound to the name. The name may contain slashes.- Overrides:
getDeepBindingin classAbstractContext- Parameters:
name- the name- Returns:
- the object bound to the name, or null if not found
-
getBinding
Description copied from class:AbstractContextGets the object bound to the name. The name will not contain slashes.- Overrides:
getBindingin classAbstractContext- Parameters:
name- the name- Returns:
- the object bound to the name, or null if not found
- Throws:
NamingException- on error
-
getBindings
Description copied from class:AbstractContextGets a map of the bindings for the current node (i.e., no names with slashes). This method must not return null.- Specified by:
getBindingsin classAbstractContext- Returns:
- a Map from binding name to binding value
- Throws:
NamingException- if a problem occurs while getting the bindigns
-
getBindings
- Throws:
NamingException
-
getWrapperBindings
- Throws:
NamingException
-
addBinding
- Specified by:
addBindingin classAbstractContext- Throws:
NamingException
-
removeBinding
Description copied from class:AbstractContextRemoves 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.- Specified by:
removeBindingin classAbstractContext- Parameters:
name- name under which the value should be boundremoveNotEmptyContext- ??? TODO figure this out- Returns:
- whether removal was successful
- Throws:
NamingException- if a problem occurs during the bind such as a value already being bound
-
addFederatedContext
protected static void addFederatedContext(AbstractFederatedContext wrappingContext, Context innerContext) throws NamingException - Throws:
NamingException
-
removeFederatedContext
protected static void removeFederatedContext(AbstractFederatedContext wrappingContext, Context innerContext) throws NamingException - Throws:
NamingException
-
isNestedSubcontext
Description copied from interface:NestedContextFactoryIs the specified value an instance of a nested context- Parameters:
value- the value to inspect- Returns:
- true if the specified value an instance of a nested context; false otherwise
-
getMasterContext
-