Package io.kroxylicious.proxy.model
Class VirtualClusterModel.VirtualClusterGatewayModel
java.lang.Object
io.kroxylicious.proxy.model.VirtualClusterModel.VirtualClusterGatewayModel
- All Implemented Interfaces:
EndpointGateway
- Enclosing class:
VirtualClusterModel
public static class VirtualClusterModel.VirtualClusterGatewayModel
extends Object
implements EndpointGateway
-
Method Summary
Modifier and TypeMethodDescriptionMap of node ids to broker addresses.getAdvertisedBrokerAddress(int nodeId) Advertised address of broker with the given node id, (advertised hostname and advertised port).Bind address to be used for network binds.getBrokerAddress(int nodeId) Broker address for given nodeId.getBrokerIdFromBrokerAddress(HostPort brokerAddress) Generates the node id implied by the given broker address (advertised hostname and bind port).Bootstrap address.Optional<io.netty.handler.ssl.SslContext> Optional<io.kroxylicious.proxy.config.tls.Tls> getTls()booleanisUseTls()true if this listener uses TLS.name()Get the gateways namebooleanIndicates if the provider requires that connections utilise the Server Name Indication (SNI) extension to TLS.toString()
-
Method Details
-
virtualCluster
- Specified by:
virtualClusterin interfaceEndpointGateway
-
getClusterBootstrapAddress
Description copied from interface:EndpointGatewayBootstrap address.- Specified by:
getClusterBootstrapAddressin interfaceEndpointGateway- Returns:
- bootstrap address.
-
getBrokerAddress
Description copied from interface:EndpointGatewayBroker address for given nodeId.- Specified by:
getBrokerAddressin interfaceEndpointGateway- Parameters:
nodeId- node id- Returns:
- broker address
- Throws:
IllegalArgumentException- address for given broker node cannot be generated.
-
getBindAddress
Description copied from interface:EndpointGatewayBind address to be used for network binds.- Specified by:
getBindAddressin interfaceEndpointGateway- Returns:
- bind address
-
requiresServerNameIndication
public boolean requiresServerNameIndication()Description copied from interface:EndpointGatewayIndicates 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.- Specified by:
requiresServerNameIndicationin interfaceEndpointGateway- Returns:
- true if this provider requires Server Name Indication (SNI).
-
getExclusivePorts
- Specified by:
getExclusivePortsin interfaceEndpointGateway
-
discoveryAddressMap
Description copied from interface:EndpointGatewayMap of node ids to broker addresses.- Specified by:
discoveryAddressMapin interfaceEndpointGateway- Returns:
- map of addresses
-
getBrokerIdFromBrokerAddress
Description copied from interface:EndpointGatewayGenerates 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.- Specified by:
getBrokerIdFromBrokerAddressin interfaceEndpointGateway- Parameters:
brokerAddress- broker address- Returns:
- broker id
-
name
Description copied from interface:EndpointGatewayGet the gateways name- Specified by:
namein interfaceEndpointGateway- Returns:
- name
-
getAdvertisedBrokerAddress
Description copied from interface:EndpointGatewayAdvertised 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 byEndpointGateway.getBrokerAddress(int). This enables Kroxylicious to sit behind yet another proxy that uses a different port from the kroxylicious bind port.- Specified by:
getAdvertisedBrokerAddressin interfaceEndpointGateway- Parameters:
nodeId- node id- Returns:
- the broker's advertised address
-
isUseTls
public boolean isUseTls()Description copied from interface:EndpointGatewaytrue if this listener uses TLS.- Specified by:
isUseTlsin interfaceEndpointGateway- Returns:
- true if listener uses TLS.
-
getDownstreamSslContext
- Specified by:
getDownstreamSslContextin interfaceEndpointGateway
-
getTls
-
toString
-