Class ANDPolicy
java.lang.Object
com.yahoo.documentapi.messagebus.protocol.ANDPolicy
- All Implemented Interfaces:
DocumentProtocolRoutingPolicy
,com.yahoo.messagebus.routing.RoutingPolicy
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
-
Method Summary
-
Constructor Details
-
ANDPolicy
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 interfacecom.yahoo.messagebus.routing.RoutingPolicy
-
merge
public void merge(com.yahoo.messagebus.routing.RoutingContext context) - Specified by:
merge
in interfacecom.yahoo.messagebus.routing.RoutingPolicy
-
destroy
public void destroy()- Specified by:
destroy
in interfacecom.yahoo.messagebus.routing.RoutingPolicy
-