Class HeaderTerm

  • All Implemented Interfaces:
    Serializable

    public final class HeaderTerm
    extends StringTerm
    This class implements comparisons for Message headers. The comparison is case-insensitive.
    Author:
    Bill Shannon, John Mani
    See Also:
    Serialized Form
    • Constructor Detail

      • HeaderTerm

        public HeaderTerm​(String headerName,
                          String pattern)
        Constructor.
        Parameters:
        headerName - The name of the header
        pattern - The pattern to search for
    • Method Detail

      • getHeaderName

        public String getHeaderName()
        Return the name of the header to compare with.
        Returns:
        the name of the header
      • match

        public boolean match​(Message msg)
        The header match method.
        Specified by:
        match in class SearchTerm
        Parameters:
        msg - The match is applied to this Message's header
        Returns:
        true if the match succeeds, otherwise false
      • hashCode

        public int hashCode()
        Compute a hashCode for this object.
        Overrides:
        hashCode in class StringTerm