Class WrapperComponentSelector

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String m_key
      The role that this selector was aquired via.
      private ServiceSelector m_selector
      The Selector we are wrapping.
    • Constructor Summary

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

      • m_selector

        private final ServiceSelector m_selector
        The Selector we are wrapping.
      • m_key

        private final java.lang.String m_key
        The role that this selector was aquired via.
    • 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.
      • getWrappedSelector

        ServiceSelector getWrappedSelector()
        The WrapperComponentManager wraps ServiceSelectors in WrapperServiceSelectors when they are looked up. This method makes it possible to release the original component selector.
        Returns:
        The ServiceSelector being wrapped.