Class SniEndPoint

  • All Implemented Interfaces:
    EndPoint

    public class SniEndPoint
    extends Object
    implements EndPoint
    An endpoint to access nodes through a proxy that uses SNI routing.
    • Constructor Detail

      • SniEndPoint

        public SniEndPoint​(InetSocketAddress proxyAddress,
                           String serverName)
        Parameters:
        proxyAddress - the address of the proxy. If it is unresolved, each call to resolve() will re-resolve it, fetch all of its A-records, and if there are more than 1 pick one in a round-robin fashion.
        serverName - the SNI server name. In the context of DSOD, this is the string representation of the host id.
    • Method Detail

      • resolve

        public InetSocketAddress resolve()
        Description copied from interface: EndPoint
        Resolves this instance to a socket address.

        This will be called each time the driver opens a new connection to the node. The returned address cannot be null.

        Specified by:
        resolve in interface EndPoint
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object