Class NamingLookupValue<T>

  • All Implemented Interfaces:
    org.jboss.msc.value.Value<T>

    public class NamingLookupValue<T>
    extends Object
    implements org.jboss.msc.value.Value<T>
    Value that is looked up from a naming context.
    Author:
    John E. Bailey
    • Constructor Detail

      • NamingLookupValue

        public NamingLookupValue​(String contextName)
        Create a new instance.
        Parameters:
        contextName - The context name to lookup if the value is not injected
    • Method Detail

      • getValue

        public T getValue()
                   throws IllegalStateException
        Lookup the value from the naming context.
        Specified by:
        getValue in interface org.jboss.msc.value.Value<T>
        Returns:
        the injected value if present, the value retrieved from the context if not.
        Throws:
        IllegalStateException - The name is not found in the context when called
      • getContextInjector

        public org.jboss.msc.inject.Injector<Context> getContextInjector()
        Get the naming context injector.
        Returns:
        The context injector