java.lang.Object
com.yahoo.documentapi.messagebus.protocol.ANDPolicy
All Implemented Interfaces:
DocumentProtocolRoutingPolicy, com.yahoo.messagebus.routing.RoutingPolicy

public class ANDPolicy extends Object implements DocumentProtocolRoutingPolicy
An AND policy is a routing policy that can be used to write simple routes that split a message between multiple other destinations. It can either be configured in a routing config, which will then produce a policy that always selects all configured recipients, or it can be configured using the policy parameter (i.e. a string following the name of the policy). Note that configured recipients take precedence over recipients configured in the parameter string.
Author:
Simon Thoresen Hult
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new AND policy that requires all recipients to be ok for it to merge their replies to an ok reply.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    merge(com.yahoo.messagebus.routing.RoutingContext context)
     
    void
    select(com.yahoo.messagebus.routing.RoutingContext context)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ANDPolicy

      public ANDPolicy(String param)
      Constructs a new AND policy that requires all recipients to be ok for it to merge their replies to an ok reply. I.e. all errors in all child replies are copied into the merged reply.
      Parameters:
      param - A string of recipients to select unless recipients have been configured.
  • Method Details

    • select

      public void select(com.yahoo.messagebus.routing.RoutingContext context)
      Specified by:
      select in interface com.yahoo.messagebus.routing.RoutingPolicy
    • merge

      public void merge(com.yahoo.messagebus.routing.RoutingContext context)
      Specified by:
      merge in interface com.yahoo.messagebus.routing.RoutingPolicy
    • destroy

      public void destroy()
      Specified by:
      destroy in interface com.yahoo.messagebus.routing.RoutingPolicy