Package com.yahoo.messagebus.routing
Class RouteDirective
- java.lang.Object
-
- com.yahoo.messagebus.routing.RouteDirective
-
- All Implemented Interfaces:
HopDirective
public class RouteDirective extends Object implements HopDirective
This class represents a route directive within aHop
's selector. This will be replaced by the named route when evaluated. If the route is not present in the running protocol's routing table, routing will fail.- Author:
- Simon Thoresen Hult
-
-
Constructor Summary
Constructors Constructor Description RouteDirective(String name)
Constructs a new directive to insert a route.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getName()
Returns the name of the route to insert.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
-
RouteDirective
public RouteDirective(String name)
Constructs a new directive to insert a route.- Parameters:
name
- The name of the route to insert.
-
-
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 String getName()
Returns the name of the route to insert.- Returns:
- The route name.
-
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.
-
-