Package org.jboss.as.naming.context
Class NamespaceContextSelector
- java.lang.Object
-
- org.jboss.as.naming.context.NamespaceContextSelector
-
public abstract class NamespaceContextSelector extends Object
Selects a naming context based on the provided identifier (eg. comp). Maintains a thread local used to managed the current selector. The current selector will be used by instances oforg.jboss.as.naming.contexts.NamespaceObjectFactoryto determine which context to return.- Author:
- John E. Bailey
-
-
Constructor Summary
Constructors Constructor Description NamespaceContextSelector()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract ContextgetContext(String identifier)Get the context for a given identifier (eg.static NamespaceContextSelectorgetCurrentSelector()Get the current context selector for the current thread.static NamespaceContextSelectorpopCurrentSelector()Pops the current selector for the thread, replacing it with the previous selectorstatic voidpushCurrentSelector(NamespaceContextSelector selector)Set the current context selector for the current thread.static voidsetDefault(NamespaceContextSelector selector)
-
-
-
Method Detail
-
pushCurrentSelector
public static void pushCurrentSelector(NamespaceContextSelector selector)
Set the current context selector for the current thread.- Parameters:
selector- The current selector
-
popCurrentSelector
public static NamespaceContextSelector popCurrentSelector()
Pops the current selector for the thread, replacing it with the previous selector- Returns:
- selector The current selector
-
getCurrentSelector
public static NamespaceContextSelector getCurrentSelector()
Get the current context selector for the current thread.- Returns:
- The current context selector.
-
getContext
public abstract Context getContext(String identifier)
Get the context for a given identifier (eg. comp -> java:comp). Implementers of this method can use any means to determine which context to return.- Parameters:
identifier- The context identifier- Returns:
- The context for this identifier
-
setDefault
public static void setDefault(NamespaceContextSelector selector)
-
-