Package com.yahoo.messagebus.routing
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 aHop
'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 Summary
Constructors Constructor Description VerbatimDirective(String image)
Constructs a new verbatim selector item for a given image.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getImage()
Returns the image to which this is a verbatim match.int
hashCode()
boolean
matches(HopDirective dir)
Returns true if this directive matches another.String
toDebugString()
Returns a string representation of this that can be debugged but not parsed.String
toString()
-
-
-
Constructor Detail
-
VerbatimDirective
public VerbatimDirective(String image)
Constructs a new verbatim selector item for a given image.- Parameters:
image
- The image to assign to this.
-
-
Method Detail
-
matches
public boolean matches(HopDirective dir)
Description copied from interface:HopDirective
Returns true if this directive matches another.- Specified by:
matches
in interfaceHopDirective
- 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.
-
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 interfaceHopDirective
- Returns:
- The debug string.
-
-