Class ExternPolicy

java.lang.Object
com.yahoo.documentapi.messagebus.protocol.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 Summary

    Constructors
    Constructor
    Description
    Constructs a new instance of this policy.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    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)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • 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 Details

    • 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