Package com.yahoo.messagebus.routing
Class PolicyDirective
- java.lang.Object
-
- com.yahoo.messagebus.routing.PolicyDirective
-
- All Implemented Interfaces:
HopDirective
public class PolicyDirective extends java.lang.Object implements HopDirective
This class represents a policy directive within aHop
'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
Constructors Constructor Description PolicyDirective(java.lang.String name, java.lang.String param)
Constructs a new policy selector item.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.lang.String
getName()
Returns the name of the policy that this item is to invoke.java.lang.String
getParam()
Returns the parameter string for this policy directive.int
hashCode()
boolean
matches(HopDirective dir)
Returns true if this directive matches another.java.lang.String
toDebugString()
Returns a string representation of this that can be debugged but not parsed.java.lang.String
toString()
-
-
-
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.
-
getName
public java.lang.String getName()
Returns the name of the policy that this item is to invoke.- Returns:
- The name name.
-
getParam
public java.lang.String getParam()
Returns the parameter string for this policy directive.- Returns:
- The parameter.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toDebugString
public java.lang.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.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-