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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()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.MirrorReturns the slobrok mirror used by this policy to resolve external recipients.voidmerge(com.yahoo.messagebus.routing.RoutingContext ctx) voidselect(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:
selectin interfacecom.yahoo.messagebus.routing.RoutingPolicy
-
merge
public void merge(com.yahoo.messagebus.routing.RoutingContext ctx) - Specified by:
mergein interfacecom.yahoo.messagebus.routing.RoutingPolicy
-
destroy
public void destroy()- Specified by:
destroyin interfacecom.yahoo.messagebus.routing.RoutingPolicy
-