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 of org.jboss.as.naming.contexts.NamespaceObjectFactory to determine which context to return.
Author:
John E. Bailey
  • Constructor Details

    • NamespaceContextSelector

      public NamespaceContextSelector()
  • Method Details

    • 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)