Class WrapperComponentSelector

    • Constructor Summary

      Constructors 
      Constructor Description
      WrapperComponentSelector​(java.lang.String key, ServiceSelector selector)
      This constructor is a constructor for a WrapperComponentSelector.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasComponent​(java.lang.Object policy)
      Check to see if a Component exists relative to the supplied policy.
      void release​(Component object)
      Return the Object when you are finished with it.
      Component select​(java.lang.Object policy)
      Select a Component based on a policy.
      • Methods inherited from class java.lang.Object

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

      • WrapperComponentSelector

        public WrapperComponentSelector​(java.lang.String key,
                                        ServiceSelector selector)
        This constructor is a constructor for a WrapperComponentSelector.
        Parameters:
        key - the key used to aquire this selector
        selector - the selector to wrap
    • Method Detail

      • hasComponent

        public boolean hasComponent​(java.lang.Object policy)
        Check to see if a Component exists relative to the supplied policy.
        Specified by:
        hasComponent in interface ComponentSelector
        Parameters:
        policy - a Object containing the selection criteria
        Returns:
        True if the component is available, False if it not.
      • release

        public void release​(Component object)
        Return the Object when you are finished with it. This allows the ServiceSelector to handle the End-Of-Life Lifecycle events associated with the Object. Please note, that no Exception should be thrown at this point. This is to allow easy use of the ServiceSelector system without having to trap Exceptions on a release.
        Specified by:
        release in interface ComponentSelector
        Parameters:
        object - The Object we are releasing.