public static final class NetworkListenerProps.Builder
extends java.lang.Object
NetworkListenerProps
Constructor and Description |
---|
Builder() |
public NetworkListenerProps.Builder loadBalancer(INetworkLoadBalancer loadBalancer)
NetworkListenerProps.getLoadBalancer()
loadBalancer
- The load balancer to attach this listener to. This parameter is required.this
public NetworkListenerProps.Builder port(java.lang.Number port)
BaseNetworkListenerProps.getPort()
port
- The port on which the listener listens for requests. This parameter is required.this
public NetworkListenerProps.Builder alpnPolicy(AlpnPolicy alpnPolicy)
BaseNetworkListenerProps.getAlpnPolicy()
alpnPolicy
- Application-Layer Protocol Negotiation (ALPN) is a TLS extension that is sent on the initial TLS handshake hello messages.
ALPN enables the application layer to negotiate which protocols should be used over a secure connection, such as HTTP/1 and HTTP/2.
Can only be specified together with Protocol TLS.
this
public NetworkListenerProps.Builder certificates(java.util.List<? extends IListenerCertificate> certificates)
BaseNetworkListenerProps.getCertificates()
certificates
- Certificate list of ACM cert ARNs.
You must provide exactly one certificate if the listener protocol is HTTPS or TLS.this
public NetworkListenerProps.Builder defaultAction(NetworkListenerAction defaultAction)
BaseNetworkListenerProps.getDefaultAction()
defaultAction
- Default action to take for requests to this listener.
This allows full control of the default Action of the load balancer,
including weighted forwarding. See the NetworkListenerAction
class for
all options.
Cannot be specified together with defaultTargetGroups
.
this
public NetworkListenerProps.Builder defaultTargetGroups(java.util.List<? extends INetworkTargetGroup> defaultTargetGroups)
BaseNetworkListenerProps.getDefaultTargetGroups()
defaultTargetGroups
- Default target groups to load balance to.
All target groups will be load balanced to with equal weight and without
stickiness. For a more complex configuration than that, use
either defaultAction
or addAction()
.
Cannot be specified together with defaultAction
.
this
public NetworkListenerProps.Builder protocol(Protocol protocol)
BaseNetworkListenerProps.getProtocol()
protocol
- Protocol for listener, expects TCP, TLS, UDP, or TCP_UDP.this
public NetworkListenerProps.Builder sslPolicy(SslPolicy sslPolicy)
BaseNetworkListenerProps.getSslPolicy()
sslPolicy
- SSL Policy.this
public NetworkListenerProps build()
NetworkListenerProps
java.lang.NullPointerException
- if any required attribute was not provided