Interface GameSession.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<GameSession.Builder,
,GameSession> SdkBuilder<GameSession.Builder,
,GameSession> SdkPojo
- Enclosing class:
GameSession
-
Method Summary
Modifier and TypeMethodDescriptioncreationTime
(Instant creationTime) A time stamp indicating when this data object was created.A unique identifier for a player.currentPlayerSessionCount
(Integer currentPlayerSessionCount) Number of players currently in the game session.The DNS identifier assigned to the instance that is running the game session.The Amazon Resource Name (ARN) associated with the GameLift fleet that this game session is running on.A unique identifier for the fleet that the game session is running on.gameProperties
(Collection<GameProperty> gameProperties) A set of key-value pairs that can store custom data in a game session.gameProperties
(Consumer<GameProperty.Builder>... gameProperties) A set of key-value pairs that can store custom data in a game session.gameProperties
(GameProperty... gameProperties) A set of key-value pairs that can store custom data in a game session.gameSessionData
(String gameSessionData) A set of custom game session properties, formatted as a single string value.gameSessionId
(String gameSessionId) A unique identifier for the game session.The IP address of the game session.The fleet location where the game session is running.matchmakerData
(String matchmakerData) Information about the matchmaking process that resulted in the game session, if matchmaking was used.maximumPlayerSessionCount
(Integer maximumPlayerSessionCount) The maximum number of players that can be connected simultaneously to the game session.A descriptive label that is associated with a game session.playerSessionCreationPolicy
(String playerSessionCreationPolicy) Indicates whether or not the game session is accepting new players.playerSessionCreationPolicy
(PlayerSessionCreationPolicy playerSessionCreationPolicy) Indicates whether or not the game session is accepting new players.The port number for the game session.Current status of the game session.status
(GameSessionStatus status) Current status of the game session.statusReason
(String statusReason) Provides additional information about game session status.statusReason
(GameSessionStatusReason statusReason) Provides additional information about game session status.terminationTime
(Instant terminationTime) A time stamp indicating when this data object was terminated.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
gameSessionId
A unique identifier for the game session. A game session ARN has the following format:
arn:aws:gamelift:<region>::gamesession/<fleet ID>/<custom ID string or idempotency token>
.- Parameters:
gameSessionId
- A unique identifier for the game session. A game session ARN has the following format:arn:aws:gamelift:<region>::gamesession/<fleet ID>/<custom ID string or idempotency token>
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
name
A descriptive label that is associated with a game session. Session names do not need to be unique.
- Parameters:
name
- A descriptive label that is associated with a game session. Session names do not need to be unique.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
fleetId
A unique identifier for the fleet that the game session is running on.
- Parameters:
fleetId
- A unique identifier for the fleet that the game session is running on.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
fleetArn
The Amazon Resource Name (ARN) associated with the GameLift fleet that this game session is running on.
- Parameters:
fleetArn
- The Amazon Resource Name (ARN) associated with the GameLift fleet that this game session is running on.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
creationTime
A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example
"1469498468.057"
).- Parameters:
creationTime
- A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example"1469498468.057"
).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
terminationTime
A time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (for example
"1469498468.057"
).- Parameters:
terminationTime
- A time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (for example"1469498468.057"
).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
currentPlayerSessionCount
Number of players currently in the game session.
- Parameters:
currentPlayerSessionCount
- Number of players currently in the game session.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
maximumPlayerSessionCount
The maximum number of players that can be connected simultaneously to the game session.
- Parameters:
maximumPlayerSessionCount
- The maximum number of players that can be connected simultaneously to the game session.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
status
Current status of the game session. A game session must have an
ACTIVE
status to have player sessions.- Parameters:
status
- Current status of the game session. A game session must have anACTIVE
status to have player sessions.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
status
Current status of the game session. A game session must have an
ACTIVE
status to have player sessions.- Parameters:
status
- Current status of the game session. A game session must have anACTIVE
status to have player sessions.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
statusReason
Provides additional information about game session status.
INTERRUPTED
indicates that the game session was hosted on a spot instance that was reclaimed, causing the active game session to be terminated.- Parameters:
statusReason
- Provides additional information about game session status.INTERRUPTED
indicates that the game session was hosted on a spot instance that was reclaimed, causing the active game session to be terminated.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
statusReason
Provides additional information about game session status.
INTERRUPTED
indicates that the game session was hosted on a spot instance that was reclaimed, causing the active game session to be terminated.- Parameters:
statusReason
- Provides additional information about game session status.INTERRUPTED
indicates that the game session was hosted on a spot instance that was reclaimed, causing the active game session to be terminated.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
gameProperties
A set of key-value pairs that can store custom data in a game session. For example:
{"Key": "difficulty", "Value": "novice"}
.- Parameters:
gameProperties
- A set of key-value pairs that can store custom data in a game session. For example:{"Key": "difficulty", "Value": "novice"}
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
gameProperties
A set of key-value pairs that can store custom data in a game session. For example:
{"Key": "difficulty", "Value": "novice"}
.- Parameters:
gameProperties
- A set of key-value pairs that can store custom data in a game session. For example:{"Key": "difficulty", "Value": "novice"}
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
gameProperties
A set of key-value pairs that can store custom data in a game session. For example:
This is a convenience method that creates an instance of the{"Key": "difficulty", "Value": "novice"}
.GameProperty.Builder
avoiding the need to create one manually viaGameProperty.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed togameProperties(List<GameProperty>)
.- Parameters:
gameProperties
- a consumer that will call methods onGameProperty.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
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.
- Parameters:
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:
- Returns a reference to this object so that method calls can be chained together.
-
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.
- Parameters:
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:
- Returns a reference to this object so that method calls can be chained together.
-
-
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.
- Parameters:
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:
- Returns a reference to this object so that method calls can be chained together.
-
playerSessionCreationPolicy
Indicates whether or not the game session is accepting new players.
- Parameters:
playerSessionCreationPolicy
- Indicates whether or not the game session is accepting new players.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
playerSessionCreationPolicy
GameSession.Builder playerSessionCreationPolicy(PlayerSessionCreationPolicy playerSessionCreationPolicy) Indicates whether or not the game session is accepting new players.
- Parameters:
playerSessionCreationPolicy
- Indicates whether or not the game session is accepting new players.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
creatorId
A unique identifier for a player. This ID is used to enforce a resource protection policy (if one exists), that limits the number of game sessions a player can create.
- Parameters:
creatorId
- A unique identifier for a player. This ID is used to enforce a resource protection policy (if one exists), that limits the number of game sessions a player can create.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
gameSessionData
A set of custom game session properties, formatted as a single string value. This data is passed to a game server process with a request to start a new game session (see Start a Game Session).
- Parameters:
gameSessionData
- A set of custom game session properties, formatted as a single string value. This data is passed to a game server process with a request to start a new game session (see Start a Game Session).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
matchmakerData
Information about the matchmaking process that resulted in the game session, if matchmaking was used. Data is in JSON syntax, formatted as a string. Information includes the matchmaker ID as well as player attributes and team assignments. For more details on matchmaker data, see Match Data. Matchmaker data is updated whenever new players are added during a successful backfill (see StartMatchBackfill ).
- Parameters:
matchmakerData
- Information about the matchmaking process that resulted in the game session, if matchmaking was used. Data is in JSON syntax, formatted as a string. Information includes the matchmaker ID as well as player attributes and team assignments. For more details on matchmaker data, see Match Data. Matchmaker data is updated whenever new players are added during a successful backfill (see StartMatchBackfill).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
location
The fleet location where the game session is running. This value might specify the fleet's home Region or a remote location. Location is expressed as an Amazon Web Services Region code such as
us-west-2
.- Parameters:
location
- The fleet location where the game session is running. This value might specify the fleet's home Region or a remote location. Location is expressed as an Amazon Web Services Region code such asus-west-2
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-