Class HopBlueprint

java.lang.Object
com.yahoo.messagebus.routing.HopBlueprint

public class HopBlueprint extends Object
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 Details

    • 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 String toString()
      Overrides:
      toString in class Object