Class LocalResolverImpl

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.util.concurrent.locks.Lock lock  
      (package private) java.util.concurrent.ConcurrentHashMap<java.lang.String,​org.glassfish.pfl.basic.func.NullaryFunction<Object>> nameToClosure  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<java.lang.String> list()
      Return the entire collection of names that are currently bound by this resolver.
      void register​(java.lang.String name, org.glassfish.pfl.basic.func.NullaryFunction<Object> closure)
      Register the Closure with the given name.
      Object resolve​(java.lang.String name)
      Look up the name using this resolver and return the CORBA object reference bound to this name, if any.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • nameToClosure

        java.util.concurrent.ConcurrentHashMap<java.lang.String,​org.glassfish.pfl.basic.func.NullaryFunction<Object>> nameToClosure
      • lock

        final java.util.concurrent.locks.Lock lock
    • Constructor Detail

      • LocalResolverImpl

        public LocalResolverImpl()
    • Method Detail

      • resolve

        public Object resolve​(java.lang.String name)
        Description copied from interface: Resolver
        Look up the name using this resolver and return the CORBA object reference bound to this name, if any.
        Specified by:
        resolve in interface Resolver
        Parameters:
        name - name of CORBA object to look up
        Returns:
        null if no object is bound to the name.
      • list

        public java.util.Set<java.lang.String> list()
        Description copied from interface: Resolver
        Return the entire collection of names that are currently bound by this resolver. Resulting collection contains only strings for which resolve does not return null. Some resolvers may not support this method, in which case they return an empty set.
        Specified by:
        list in interface Resolver
        Returns:
        All currently bound names
      • register

        public void register​(java.lang.String name,
                             org.glassfish.pfl.basic.func.NullaryFunction<Object> closure)
        Description copied from interface: LocalResolver
        Register the Closure with the given name.
        Specified by:
        register in interface LocalResolver
        Parameters:
        name - name of Closure to register
        closure - supplier of CORBA object