Class Listener
- java.lang.Object
-
- software.amazon.awssdk.services.globalaccelerator.model.Listener
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<Listener.Builder,Listener>
@Generated("software.amazon.awssdk:codegen") public final class Listener extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Listener.Builder,Listener>
A complex type for a listener.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceListener.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Listener.Builderbuilder()ClientAffinityclientAffinity()Client affinity lets you direct all requests from a user to the same endpoint, if you have stateful applications, regardless of the port and protocol of the client request.StringclientAffinityAsString()Client affinity lets you direct all requests from a user to the same endpoint, if you have stateful applications, regardless of the port and protocol of the client request.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()booleanhasPortRanges()For responses, this returns true if the service returned a value for the PortRanges property.StringlistenerArn()The Amazon Resource Name (ARN) of the listener.List<PortRange>portRanges()The list of port ranges for the connections from clients to the accelerator.Protocolprotocol()The protocol for the connections from clients to the accelerator.StringprotocolAsString()The protocol for the connections from clients to the accelerator.List<SdkField<?>>sdkFields()static Class<? extends Listener.Builder>serializableBuilderClass()Listener.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
listenerArn
public final String listenerArn()
The Amazon Resource Name (ARN) of the listener.
- Returns:
- The Amazon Resource Name (ARN) of the listener.
-
hasPortRanges
public final boolean hasPortRanges()
For responses, this returns true if the service returned a value for the PortRanges property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
portRanges
public final List<PortRange> portRanges()
The list of port ranges for the connections from clients to the accelerator.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasPortRanges()method.- Returns:
- The list of port ranges for the connections from clients to the accelerator.
-
protocol
public final Protocol protocol()
The protocol for the connections from clients to the accelerator.
If the service returns an enum value that is not available in the current SDK version,
protocolwill returnProtocol.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromprotocolAsString().- Returns:
- The protocol for the connections from clients to the accelerator.
- See Also:
Protocol
-
protocolAsString
public final String protocolAsString()
The protocol for the connections from clients to the accelerator.
If the service returns an enum value that is not available in the current SDK version,
protocolwill returnProtocol.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromprotocolAsString().- Returns:
- The protocol for the connections from clients to the accelerator.
- See Also:
Protocol
-
clientAffinity
public final ClientAffinity clientAffinity()
Client affinity lets you direct all requests from a user to the same endpoint, if you have stateful applications, regardless of the port and protocol of the client request. Client affinity gives you control over whether to always route each client to the same specific endpoint.
Global Accelerator uses a consistent-flow hashing algorithm to choose the optimal endpoint for a connection. If client affinity is
NONE, Global Accelerator uses the "five-tuple" (5-tuple) properties—source IP address, source port, destination IP address, destination port, and protocol—to select the hash value, and then chooses the best endpoint. However, with this setting, if someone uses different ports to connect to Global Accelerator, their connections might not be always routed to the same endpoint because the hash value changes.If you want a given client to always be routed to the same endpoint, set client affinity to
SOURCE_IPinstead. When you use theSOURCE_IPsetting, Global Accelerator uses the "two-tuple" (2-tuple) properties— source (client) IP address and destination IP address—to select the hash value.The default value is
NONE.If the service returns an enum value that is not available in the current SDK version,
clientAffinitywill returnClientAffinity.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromclientAffinityAsString().- Returns:
- Client affinity lets you direct all requests from a user to the same endpoint, if you have stateful
applications, regardless of the port and protocol of the client request. Client affinity gives you
control over whether to always route each client to the same specific endpoint.
Global Accelerator uses a consistent-flow hashing algorithm to choose the optimal endpoint for a connection. If client affinity is
NONE, Global Accelerator uses the "five-tuple" (5-tuple) properties—source IP address, source port, destination IP address, destination port, and protocol—to select the hash value, and then chooses the best endpoint. However, with this setting, if someone uses different ports to connect to Global Accelerator, their connections might not be always routed to the same endpoint because the hash value changes.If you want a given client to always be routed to the same endpoint, set client affinity to
SOURCE_IPinstead. When you use theSOURCE_IPsetting, Global Accelerator uses the "two-tuple" (2-tuple) properties— source (client) IP address and destination IP address—to select the hash value.The default value is
NONE. - See Also:
ClientAffinity
-
clientAffinityAsString
public final String clientAffinityAsString()
Client affinity lets you direct all requests from a user to the same endpoint, if you have stateful applications, regardless of the port and protocol of the client request. Client affinity gives you control over whether to always route each client to the same specific endpoint.
Global Accelerator uses a consistent-flow hashing algorithm to choose the optimal endpoint for a connection. If client affinity is
NONE, Global Accelerator uses the "five-tuple" (5-tuple) properties—source IP address, source port, destination IP address, destination port, and protocol—to select the hash value, and then chooses the best endpoint. However, with this setting, if someone uses different ports to connect to Global Accelerator, their connections might not be always routed to the same endpoint because the hash value changes.If you want a given client to always be routed to the same endpoint, set client affinity to
SOURCE_IPinstead. When you use theSOURCE_IPsetting, Global Accelerator uses the "two-tuple" (2-tuple) properties— source (client) IP address and destination IP address—to select the hash value.The default value is
NONE.If the service returns an enum value that is not available in the current SDK version,
clientAffinitywill returnClientAffinity.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromclientAffinityAsString().- Returns:
- Client affinity lets you direct all requests from a user to the same endpoint, if you have stateful
applications, regardless of the port and protocol of the client request. Client affinity gives you
control over whether to always route each client to the same specific endpoint.
Global Accelerator uses a consistent-flow hashing algorithm to choose the optimal endpoint for a connection. If client affinity is
NONE, Global Accelerator uses the "five-tuple" (5-tuple) properties—source IP address, source port, destination IP address, destination port, and protocol—to select the hash value, and then chooses the best endpoint. However, with this setting, if someone uses different ports to connect to Global Accelerator, their connections might not be always routed to the same endpoint because the hash value changes.If you want a given client to always be routed to the same endpoint, set client affinity to
SOURCE_IPinstead. When you use theSOURCE_IPsetting, Global Accelerator uses the "two-tuple" (2-tuple) properties— source (client) IP address and destination IP address—to select the hash value.The default value is
NONE. - See Also:
ClientAffinity
-
toBuilder
public Listener.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<Listener.Builder,Listener>
-
builder
public static Listener.Builder builder()
-
serializableBuilderClass
public static Class<? extends Listener.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
-