Class ExternPolicy
java.lang.Object
com.yahoo.documentapi.messagebus.protocol.ExternPolicy
- All Implemented Interfaces:
DocumentProtocolRoutingPolicy
,com.yahoo.messagebus.routing.RoutingPolicy
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
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
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 Details
-
ExternPolicy
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 Details
-
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
-