Class GameSessionConnectionInfo
- java.lang.Object
-
- software.amazon.awssdk.services.gamelift.model.GameSessionConnectionInfo
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<GameSessionConnectionInfo.Builder,GameSessionConnectionInfo>
@Generated("software.amazon.awssdk:codegen") public final class GameSessionConnectionInfo extends Object implements SdkPojo, Serializable, ToCopyableBuilder<GameSessionConnectionInfo.Builder,GameSessionConnectionInfo>
Connection information for a new game session that is created in response to a start matchmaking request. Once a match is made, the FlexMatch engine creates a new game session for it. This information, including the game session endpoint and player sessions for each player in the original matchmaking request, is added to the matchmaking ticket.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceGameSessionConnectionInfo.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GameSessionConnectionInfo.Builderbuilder()StringdnsName()The DNS identifier assigned to the instance that is running the game session.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)StringgameSessionArn()A unique identifier for the game session.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()booleanhasMatchedPlayerSessions()For responses, this returns true if the service returned a value for the MatchedPlayerSessions property.StringipAddress()The IP address of the game session.List<MatchedPlayerSession>matchedPlayerSessions()A collection of player session IDs, one for each player ID that was included in the original matchmaking request.Integerport()The port number for the game session.List<SdkField<?>>sdkFields()static Class<? extends GameSessionConnectionInfo.Builder>serializableBuilderClass()GameSessionConnectionInfo.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
-
gameSessionArn
public final String gameSessionArn()
A unique identifier for the game session. Use the game session ID.
- Returns:
- A unique identifier for the game session. Use the game session ID.
-
ipAddress
public final String ipAddress()
The IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.
- Returns:
- The IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.
-
dnsName
public final String dnsName()
The DNS identifier assigned to the instance that is running the game session. Values have the following format:
-
TLS-enabled fleets:
<unique identifier>.<region identifier>.amazongamelift.com. -
Non-TLS-enabled fleets:
ec2-<unique identifier>.compute.amazonaws.com. (See Amazon EC2 Instance IP Addressing.)
When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.
- Returns:
- The DNS identifier assigned to the instance that is running the game session. Values have the following
format:
-
TLS-enabled fleets:
<unique identifier>.<region identifier>.amazongamelift.com. -
Non-TLS-enabled fleets:
ec2-<unique identifier>.compute.amazonaws.com. (See Amazon EC2 Instance IP Addressing.)
When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.
-
-
-
port
public final Integer port()
The port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.
- Returns:
- The port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.
-
hasMatchedPlayerSessions
public final boolean hasMatchedPlayerSessions()
For responses, this returns true if the service returned a value for the MatchedPlayerSessions 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.
-
matchedPlayerSessions
public final List<MatchedPlayerSession> matchedPlayerSessions()
A collection of player session IDs, one for each player ID that was included in the original matchmaking request.
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
hasMatchedPlayerSessions()method.- Returns:
- A collection of player session IDs, one for each player ID that was included in the original matchmaking request.
-
toBuilder
public GameSessionConnectionInfo.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<GameSessionConnectionInfo.Builder,GameSessionConnectionInfo>
-
builder
public static GameSessionConnectionInfo.Builder builder()
-
serializableBuilderClass
public static Class<? extends GameSessionConnectionInfo.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.
-
-