Package com.yahoo.messagebus.routing
Class PolicyDirective
java.lang.Object
com.yahoo.messagebus.routing.PolicyDirective
- All Implemented Interfaces:
HopDirective
This class represents a policy directive within a
Hop
's selector. This means to create the named protocol
using the given parameter string, and then running that protocol within the context of this directive.- Author:
- Simon Thoresen Hult
-
Constructor Summary
ConstructorDescriptionPolicyDirective
(String name, String param) Constructs a new policy selector item. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getName()
Returns the name of the policy that this item is to invoke.getParam()
Returns the parameter string for this policy directive.int
hashCode()
boolean
matches
(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
-
PolicyDirective
Constructs a new policy selector item.- Parameters:
name
- The name of the policy to invoke.param
- The parameter to pass to the name constructor.
-
-
Method Details
-
matches
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.
-
getName
Returns the name of the policy that this item is to invoke.- Returns:
- The name name.
-
getParam
Returns the parameter string for this policy directive.- Returns:
- The parameter.
-
equals
-
toString
-
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.
-
hashCode
public int hashCode()
-