Class ExternPolicy

  • All Implemented Interfaces:
    DocumentProtocolRoutingPolicy, com.yahoo.messagebus.routing.RoutingPolicy

    public class ExternPolicy
    extends 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 Detail

      • ExternPolicy

        public ExternPolicy​(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 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 interface com.yahoo.messagebus.routing.RoutingPolicy
      • merge

        public void merge​(com.yahoo.messagebus.routing.RoutingContext ctx)
        Specified by:
        merge in interface com.yahoo.messagebus.routing.RoutingPolicy
      • destroy

        public void destroy()
        Specified by:
        destroy in interface com.yahoo.messagebus.routing.RoutingPolicy