Class ListenerProps.Builder
java.lang.Object
software.amazon.awscdk.services.globalaccelerator.ListenerProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ListenerProps>
- Enclosing interface:
- ListenerProps
@Stability(Stable)
public static final class ListenerProps.Builder
extends Object
implements software.amazon.jsii.Builder<ListenerProps>
A builder for
ListenerProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaccelerator
(IAccelerator accelerator) Sets the value ofListenerProps.getAccelerator()
build()
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
-
accelerator
Sets the value ofListenerProps.getAccelerator()
- Parameters:
accelerator
- The accelerator for this listener. This parameter is required.- Returns:
this
-
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<ListenerProps>
- Returns:
- a new instance of
ListenerProps
- Throws:
NullPointerException
- if any required attribute was not provided
-