Package com.yahoo.messagebus.routing
Class ErrorDirective
java.lang.Object
com.yahoo.messagebus.routing.ErrorDirective
- All Implemented Interfaces:
HopDirective
This class represents an error directive within a
Hop's selector. This means to stop whatever is being
resolved, and instead return a reply containing a specified error.- Author:
- Simon Thoresen Hult
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the error string that is to be assigned to the reply.inthashCode()booleanmatches(HopDirective dir) Returns true if this directive matches another.Returns a string representation of this that can be debugged but not parsed.toString()
-
Constructor Details
-
ErrorDirective
Constructs a new error directive.- Parameters:
msg- The error message.
-
-
Method Details
-
getMessage
Returns the error string that is to be assigned to the reply.- Returns:
- The error string.
-
matches
Description copied from interface:HopDirectiveReturns true if this directive matches another.- Specified by:
matchesin interfaceHopDirective- Parameters:
dir- The directive to compare this to.- Returns:
- True if this matches the argument.
-
equals
-
toString
-
toDebugString
Description copied from interface:HopDirectiveReturns a string representation of this that can be debugged but not parsed.- Specified by:
toDebugStringin interfaceHopDirective- Returns:
- The debug string.
-
hashCode
public int hashCode()
-