Class ExternPolicy
- java.lang.Object
-
- com.yahoo.documentapi.messagebus.protocol.ExternPolicy
-
- All Implemented Interfaces:
DocumentProtocolRoutingPolicy
,com.yahoo.messagebus.routing.RoutingPolicy
public class ExternPolicy extends java.lang.Object implements DocumentProtocolRoutingPolicy
This policy implements the necessary logic to communicate with an external Vespa application and resolve its list of recipients using that other application's slobrok servers.- Author:
- Simon Thoresen Hult
-
-
Constructor Summary
Constructors Constructor Description ExternPolicy(java.lang.String arg)
Constructs a new instance of this policy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
java.lang.String
getError()
This is a safety mechanism to allow the constructor to fail and signal that it can not be used.com.yahoo.jrt.slobrok.api.Mirror
getMirror()
Returns the slobrok mirror used by this policy to resolve external recipients.void
merge(com.yahoo.messagebus.routing.RoutingContext ctx)
void
select(com.yahoo.messagebus.routing.RoutingContext ctx)
-
-
-
Constructor Detail
-
ExternPolicy
public ExternPolicy(java.lang.String arg)
Constructs a new instance of this policy. The argument given is the connection spec to the slobrok to use for resolving recipients, as well as the pattern to use when querying. This constructor does _not_ wait for the mirror to become ready.- Parameters:
arg
- The slobrok connection spec.
-
-
Method Detail
-
getError
public java.lang.String getError()
This is a safety mechanism to allow the constructor to fail and signal that it can not be used.- Returns:
- The error string, or null if no error.
-
getMirror
public com.yahoo.jrt.slobrok.api.Mirror getMirror()
Returns the slobrok mirror used by this policy to resolve external recipients.- Returns:
- The external mirror.
-
select
public void select(com.yahoo.messagebus.routing.RoutingContext ctx)
- Specified by:
select
in interfacecom.yahoo.messagebus.routing.RoutingPolicy
-
merge
public void merge(com.yahoo.messagebus.routing.RoutingContext ctx)
- Specified by:
merge
in interfacecom.yahoo.messagebus.routing.RoutingPolicy
-
destroy
public void destroy()
- Specified by:
destroy
in interfacecom.yahoo.messagebus.routing.RoutingPolicy
-
-