Class ANDPolicy
- java.lang.Object
-
- com.yahoo.documentapi.messagebus.protocol.ANDPolicy
-
- All Implemented Interfaces:
DocumentProtocolRoutingPolicy
,com.yahoo.messagebus.routing.RoutingPolicy
public class ANDPolicy extends java.lang.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 ANDPolicy(java.lang.String param)
Constructs a new AND policy that requires all recipients to be ok for it to merge their replies to an ok reply.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
void
merge(com.yahoo.messagebus.routing.RoutingContext context)
void
select(com.yahoo.messagebus.routing.RoutingContext context)
-
-
-
Constructor Detail
-
ANDPolicy
public ANDPolicy(java.lang.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 Detail
-
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
-
-