Package com.yahoo.messagebus.routing
Class HopBlueprint
- java.lang.Object
-
- com.yahoo.messagebus.routing.HopBlueprint
-
public class HopBlueprint extends java.lang.Object
A hop blueprint is a stored prototype of a hop that has been created from aHopSpec
object. A map of these are stored in aRoutingTable
.- Author:
- bratseth, Simon Thoresen Hult
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Hop
create()
Creates a hop instance from thie blueprint.HopDirective
getDirective(int i)
Returns the directive at the given index.boolean
getIgnoreResult()
Returns whether or not to ignore the result when routing through this hop.int
getNumDirectives()
Returns the number of directives contained in this hop.int
getNumRecipients()
Returns the number of recipients that the selector can choose from.Hop
getRecipient(int i)
Returns the recipient at the given index.boolean
hasDirectives()
Returns whether or not there are any directives contained in this hop.boolean
hasRecipients()
Returns whether or not there are any recipients that the selector can choose from.HopBlueprint
setIgnoreResult(boolean ignoreResult)
Sets whether or not to ignore the result when routing through this hop.java.lang.String
toString()
-
-
-
Method Detail
-
create
public Hop 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
public HopDirective getDirective(int i)
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
public Hop getRecipient(int i)
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
public HopBlueprint setIgnoreResult(boolean ignoreResult)
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
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-