Class TagFilter<T>

  • All Implemented Interfaces:
    IAsyncFilter<T>

    public class TagFilter<T>
    extends java.lang.Object
    implements IAsyncFilter<T>
    Tag filter class. Allows for filtering according to a collection of tags. Includes only services that contain all the tags. Replaces variables to dynamic values and uses TagProperty.createRuntimeTags() for that.
    • Field Detail

      • tags

        protected java.util.Collection<java.lang.String> tags
        The search tags.
    • Constructor Detail

      • TagFilter

        public TagFilter()
      • TagFilter

        public TagFilter​(IExternalAccess component,
                         java.lang.String... tags)
        Create a new tag filter.
      • TagFilter

        public TagFilter​(IExternalAccess component,
                         java.util.Collection<java.lang.String> tags)
        Create a new tag filter.
    • Method Detail

      • filter

        public IFuture<java.lang.Boolean> filter​(T ts)
        Filter if a service contains all the tags.
        Specified by:
        filter in interface IAsyncFilter<T>
        Returns:
        True, if passes the filter.
      • getComponent

        public IExternalAccess getComponent()
        Returns:
        the component
      • setComponent

        public void setComponent​(IExternalAccess component)
        Sets the component.
        Parameters:
        component - The component to set
      • getTags

        public java.util.Collection<java.lang.String> getTags()
        Returns:
        the tags
      • setTags

        public void setTags​(java.util.Collection<java.lang.String> tags)
        Sets the tags.
        Parameters:
        tags - The tags to set