Package com.yahoo.messagebus.routing
Class HopBlueprint
java.lang.Object
com.yahoo.messagebus.routing.HopBlueprint
A hop blueprint is a stored prototype of a hop that has been created from a
HopSpec
object. A map of these
are stored in a RoutingTable
.- Author:
- bratseth, Simon Thoresen Hult
-
Method Summary
Modifier and TypeMethodDescriptioncreate()
Creates a hop instance from thie blueprint.getDirective
(int i) Returns the directive at the given index.boolean
Returns whether or not to ignore the result when routing through this hop.int
Returns the number of directives contained in this hop.int
Returns the number of recipients that the selector can choose from.getRecipient
(int i) Returns the recipient at the given index.boolean
Returns whether or not there are any directives contained in this hop.boolean
Returns whether or not there are any recipients that the selector can choose from.setIgnoreResult
(boolean ignoreResult) Sets whether or not to ignore the result when routing through this hop.toString()
-
Method Details
-
create
Creates a hop instance from thie blueprint.- Returns:
- The created hop.
-
hasDirectives
public boolean hasDirectives()Returns whether or not there are any directives contained in this hop.- Returns:
- True if there is at least one directive.
-
getNumDirectives
public int getNumDirectives()Returns the number of directives contained in this hop.- Returns:
- The number of directives.
-
getDirective
Returns the directive at the given index.- Parameters:
i
- The index of the directive to return.- Returns:
- The item.
-
hasRecipients
public boolean hasRecipients()Returns whether or not there are any recipients that the selector can choose from.- Returns:
- True if there is at least one recipient.
-
getNumRecipients
public int getNumRecipients()Returns the number of recipients that the selector can choose from.- Returns:
- The number of recipients.
-
getRecipient
Returns the recipient at the given index.- Parameters:
i
- The index of the recipient to return.- Returns:
- The recipient at the given index.
-
getIgnoreResult
public boolean getIgnoreResult()Returns whether or not to ignore the result when routing through this hop.- Returns:
- True to ignore the result.
-
setIgnoreResult
Sets whether or not to ignore the result when routing through this hop.- Parameters:
ignoreResult
- Whether or not to ignore the result.- Returns:
- This, to allow chaining.
-
toString
-