Interface EndpointGateway

All Known Implementing Classes:
VirtualClusterModel.VirtualClusterGatewayModel

public interface EndpointGateway
A gateway to an endpoint.
  • Method Details

    • isUseTls

      boolean isUseTls()
      true if this listener uses TLS.
      Returns:
      true if listener uses TLS.
    • requiresServerNameIndication

      boolean requiresServerNameIndication()
      Indicates if the provider requires that connections utilise the Server Name Indication (SNI) extension to TLS. If this is true, then the provider cannot support plain connections.
      Returns:
      true if this provider requires Server Name Indication (SNI).
    • virtualCluster

      VirtualClusterModel virtualCluster()
    • getClusterBootstrapAddress

      HostPort getClusterBootstrapAddress()
      Bootstrap address.
      Returns:
      bootstrap address.
    • getBrokerAddress

      HostPort getBrokerAddress(int nodeId) throws IllegalArgumentException
      Broker address for given nodeId.
      Parameters:
      nodeId - node id
      Returns:
      broker address
      Throws:
      IllegalArgumentException - address for given broker node cannot be generated.
    • getDownstreamSslContext

      Optional<io.netty.handler.ssl.SslContext> getDownstreamSslContext()
    • getAdvertisedBrokerAddress

      HostPort getAdvertisedBrokerAddress(int nodeId)
      Advertised address of broker with the given node id, (advertised hostname and advertised port). This is what is returned to clients and may differ from the node's bind port as presented by getBrokerAddress(int). This enables Kroxylicious to sit behind yet another proxy that uses a different port from the kroxylicious bind port.
      Parameters:
      nodeId - node id
      Returns:
      the broker's advertised address
      Throws:
      IllegalArgumentException - if this provider cannot produce a broker address for the given nodeId.
    • getBindAddress

      Optional<String> getBindAddress()
      Bind address to be used for network binds.
      Returns:
      bind address
    • getExclusivePorts

      Set<Integer> getExclusivePorts()
    • getSharedPorts

      Set<Integer> getSharedPorts()
    • discoveryAddressMap

      Map<Integer,HostPort> discoveryAddressMap()
      Map of node ids to broker addresses.
      Returns:
      map of addresses
    • getBrokerIdFromBrokerAddress

      @Nullable Integer getBrokerIdFromBrokerAddress(HostPort brokerAddress)
      Generates the node id implied by the given broker address (advertised hostname and bind port). This method make sense only for implementation that embed node id information into the broker address. This information is used at startup time to allow a client that already in possession of a broker address to reconnect to the cluster via Kroxylicious using only that address.
      This is an optional method. An implementation can return null.
      Parameters:
      brokerAddress - broker address
      Returns:
      broker id
    • name

      String name()
      Get the gateways name
      Returns:
      name