Class ListenerOptions.Builder
java.lang.Object
software.amazon.awscdk.services.globalaccelerator.ListenerOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ListenerOptions>
- Enclosing interface:
ListenerOptions
@Stability(Stable)
public static final class ListenerOptions.Builder
extends Object
implements software.amazon.jsii.Builder<ListenerOptions>
A builder for
ListenerOptions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.clientAffinity
(ClientAffinity clientAffinity) Sets the value ofListenerOptions.getClientAffinity()
listenerName
(String listenerName) Sets the value ofListenerOptions.getListenerName()
portRanges
(List<? extends PortRange> portRanges) Sets the value ofListenerOptions.getPortRanges()
protocol
(ConnectionProtocol protocol) Sets the value ofListenerOptions.getProtocol()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
portRanges
Sets the value ofListenerOptions.getPortRanges()
- Parameters:
portRanges
- The list of port ranges for the connections from clients to the accelerator. This parameter is required.- Returns:
this
-
clientAffinity
Sets the value ofListenerOptions.getClientAffinity()
- Parameters:
clientAffinity
- Client affinity to direct all requests from a user to the same endpoint. If you have stateful applications, client affinity lets you direct all requests from a user to the same endpoint.By default, each connection from each client is routed to seperate endpoints. Set client affinity to SOURCE_IP to route all connections from a single client to the same endpoint.
- Returns:
this
-
listenerName
Sets the value ofListenerOptions.getListenerName()
- Parameters:
listenerName
- Name of the listener.- Returns:
this
-
protocol
Sets the value ofListenerOptions.getProtocol()
- Parameters:
protocol
- The protocol for the connections from clients to the accelerator.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ListenerOptions>
- Returns:
- a new instance of
ListenerOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-