Class VerbatimDirective

java.lang.Object
com.yahoo.messagebus.routing.VerbatimDirective
All Implemented Interfaces:
HopDirective

public class VerbatimDirective extends Object implements HopDirective
This class represents a verbatim match within a Hop's selector. This is nothing more than a string that will be used as-is when performing service name lookups.
Author:
Simon Thoresen Hult
  • Constructor Details

    • VerbatimDirective

      public VerbatimDirective(String image)
      Constructs a new verbatim selector item for a given image.
      Parameters:
      image - The image to assign to this.
  • Method Details

    • matches

      public boolean matches(HopDirective dir)
      Description copied from interface: HopDirective
      Returns true if this directive matches another.
      Specified by:
      matches in interface HopDirective
      Parameters:
      dir - The directive to compare this to.
      Returns:
      True if this matches the argument.
    • getImage

      public String getImage()
      Returns the image to which this is a verbatim match.
      Returns:
      The image.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toDebugString

      public String toDebugString()
      Description copied from interface: HopDirective
      Returns a string representation of this that can be debugged but not parsed.
      Specified by:
      toDebugString in interface HopDirective
      Returns:
      The debug string.