Class GameSessionPlacement
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<GameSessionPlacement.Builder,
GameSessionPlacement>
Represents a potential game session placement, including the full details of the original placement request and the current status.
If the game session placement status is PENDING
, the properties for game session ID/ARN, region, IP
address/DNS, and port aren't final. A game session is not active and ready to accept players until placement status
reaches FULFILLED
. When the placement is in PENDING
status, Amazon GameLift may attempt to
place a game session multiple times before succeeding. With each attempt it creates a GameSession object and
updates this placement object with the new game session properties..
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic GameSessionPlacement.Builder
builder()
final String
dnsName()
The DNS identifier assigned to the instance that is running the game session.final Instant
endTime()
Time stamp indicating when this request was completed, canceled, or timed out.final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final List
<GameProperty> A set of key-value pairs that can store custom data in a game session.final String
Identifier for the game session created by this placement request.final String
A set of custom game session properties, formatted as a single string value.final String
A unique identifier for the game session.final String
A descriptive label that is associated with a game session.final String
A descriptive label that is associated with game session queue.final String
Name of the Region where the game session created by this placement request is running.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final boolean
For responses, this returns true if the service returned a value for the GameProperties property.final int
hashCode()
final boolean
For responses, this returns true if the service returned a value for the PlacedPlayerSessions property.final boolean
For responses, this returns true if the service returned a value for the PlayerLatencies property.final String
The IP address of the game session.final String
Information on the matchmaking process for this game.final Integer
The maximum number of players that can be connected simultaneously to the game session.final List
<PlacedPlayerSession> A collection of information on player sessions created in response to the game session placement request.final String
A unique identifier for a game session placement.final List
<PlayerLatency> A set of values, expressed in milliseconds, that indicates the amount of latency that a player experiences when connected to Amazon Web Services Regions.final Integer
port()
The port number for the game session.static Class
<? extends GameSessionPlacement.Builder> final Instant
Time stamp indicating when this request was placed in the queue.status()
Current status of the game session placement request.final String
Current status of the game session placement request.Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
placementId
A unique identifier for a game session placement.
- Returns:
- A unique identifier for a game session placement.
-
gameSessionQueueName
A descriptive label that is associated with game session queue. Queue names must be unique within each Region.
- Returns:
- A descriptive label that is associated with game session queue. Queue names must be unique within each Region.
-
status
Current status of the game session placement request.
-
PENDING -- The placement request is in the queue waiting to be processed. Game session properties are not yet final.
-
FULFILLED -- A new game session has been successfully placed. Game session properties are now final.
-
CANCELLED -- The placement request was canceled.
-
TIMED_OUT -- A new game session was not successfully created before the time limit expired. You can resubmit the placement request as needed.
-
FAILED -- Amazon GameLift is not able to complete the process of placing the game session. Common reasons are the game session terminated before the placement process was completed, or an unexpected internal error.
If the service returns an enum value that is not available in the current SDK version,
status
will returnGameSessionPlacementState.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromstatusAsString()
.- Returns:
- Current status of the game session placement request.
-
PENDING -- The placement request is in the queue waiting to be processed. Game session properties are not yet final.
-
FULFILLED -- A new game session has been successfully placed. Game session properties are now final.
-
CANCELLED -- The placement request was canceled.
-
TIMED_OUT -- A new game session was not successfully created before the time limit expired. You can resubmit the placement request as needed.
-
FAILED -- Amazon GameLift is not able to complete the process of placing the game session. Common reasons are the game session terminated before the placement process was completed, or an unexpected internal error.
-
- See Also:
-
-
statusAsString
Current status of the game session placement request.
-
PENDING -- The placement request is in the queue waiting to be processed. Game session properties are not yet final.
-
FULFILLED -- A new game session has been successfully placed. Game session properties are now final.
-
CANCELLED -- The placement request was canceled.
-
TIMED_OUT -- A new game session was not successfully created before the time limit expired. You can resubmit the placement request as needed.
-
FAILED -- Amazon GameLift is not able to complete the process of placing the game session. Common reasons are the game session terminated before the placement process was completed, or an unexpected internal error.
If the service returns an enum value that is not available in the current SDK version,
status
will returnGameSessionPlacementState.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromstatusAsString()
.- Returns:
- Current status of the game session placement request.
-
PENDING -- The placement request is in the queue waiting to be processed. Game session properties are not yet final.
-
FULFILLED -- A new game session has been successfully placed. Game session properties are now final.
-
CANCELLED -- The placement request was canceled.
-
TIMED_OUT -- A new game session was not successfully created before the time limit expired. You can resubmit the placement request as needed.
-
FAILED -- Amazon GameLift is not able to complete the process of placing the game session. Common reasons are the game session terminated before the placement process was completed, or an unexpected internal error.
-
- See Also:
-
-
hasGameProperties
public final boolean hasGameProperties()For responses, this returns true if the service returned a value for the GameProperties 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. -
gameProperties
A set of key-value pairs that can store custom data in a game session. For example:
{"Key": "difficulty", "Value": "novice"}
.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
hasGameProperties()
method.- Returns:
- A set of key-value pairs that can store custom data in a game session. For example:
{"Key": "difficulty", "Value": "novice"}
.
-
maximumPlayerSessionCount
The maximum number of players that can be connected simultaneously to the game session.
- Returns:
- The maximum number of players that can be connected simultaneously to the game session.
-
gameSessionName
A descriptive label that is associated with a game session. Session names do not need to be unique.
- Returns:
- A descriptive label that is associated with a game session. Session names do not need to be unique.
-
gameSessionId
A unique identifier for the game session. This value isn't final until placement status is
FULFILLED
.- Returns:
- A unique identifier for the game session. This value isn't final until placement status is
FULFILLED
.
-
gameSessionArn
Identifier for the game session created by this placement request. This identifier is unique across all Regions. This value isn't final until placement status is
FULFILLED
.- Returns:
- Identifier for the game session created by this placement request. This identifier is unique across all
Regions. This value isn't final until placement status is
FULFILLED
.
-
gameSessionRegion
Name of the Region where the game session created by this placement request is running. This value isn't final until placement status is
FULFILLED
.- Returns:
- Name of the Region where the game session created by this placement request is running. This value isn't
final until placement status is
FULFILLED
.
-
hasPlayerLatencies
public final boolean hasPlayerLatencies()For responses, this returns true if the service returned a value for the PlayerLatencies 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. -
playerLatencies
A set of values, expressed in milliseconds, that indicates the amount of latency that a player experiences when connected to Amazon Web Services Regions.
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
hasPlayerLatencies()
method.- Returns:
- A set of values, expressed in milliseconds, that indicates the amount of latency that a player experiences when connected to Amazon Web Services Regions.
-
startTime
Time stamp indicating when this request was placed in the queue. Format is a number expressed in Unix time as milliseconds (for example
"1469498468.057"
).- Returns:
- Time stamp indicating when this request was placed in the queue. Format is a number expressed in Unix
time as milliseconds (for example
"1469498468.057"
).
-
endTime
Time stamp indicating when this request was completed, canceled, or timed out.
- Returns:
- Time stamp indicating when this request was completed, canceled, or timed out.
-
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. This value isn't final until placement status is
FULFILLED
.- 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. This value isn't final until placement status is
FULFILLED
.
-
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
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. This value isn't final until placement status is
FULFILLED
.- 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. This value isn't final until placement status is
FULFILLED
.
-
hasPlacedPlayerSessions
public final boolean hasPlacedPlayerSessions()For responses, this returns true if the service returned a value for the PlacedPlayerSessions 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. -
placedPlayerSessions
A collection of information on player sessions created in response to the game session placement request. These player sessions are created only after a new game session is successfully placed (placement status is
FULFILLED
). This information includes the player ID, provided in the placement request, and a corresponding player session ID.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
hasPlacedPlayerSessions()
method.- Returns:
- A collection of information on player sessions created in response to the game session placement request.
These player sessions are created only after a new game session is successfully placed (placement status
is
FULFILLED
). This information includes the player ID, provided in the placement request, and a corresponding player session ID.
-
gameSessionData
A set of custom game session properties, formatted as a single string value. This data is passed to a game server process in the
GameSession
object with a request to start a new game session (see Start a Game Session).- Returns:
- A set of custom game session properties, formatted as a single string value. This data is passed to a
game server process in the
GameSession
object with a request to start a new game session (see Start a Game Session).
-
matchmakerData
Information on the matchmaking process for this game. Data is in JSON syntax, formatted as a string. It identifies the matchmaking configuration used to create the match, and contains data on all players assigned to the match, including player attributes and team assignments. For more details on matchmaker data, see Match Data.
- Returns:
- Information on the matchmaking process for this game. Data is in JSON syntax, formatted as a string. It identifies the matchmaking configuration used to create the match, and contains data on all players assigned to the match, including player attributes and team assignments. For more details on matchmaker data, see Match Data.
-
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<GameSessionPlacement.Builder,
GameSessionPlacement> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode() -
equals
-
equalsBySdkFields
Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
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. -
getValueForField
-
sdkFields
-