@Generated(value="software.amazon.awssdk:codegen") public final class GameServer extends Object implements SdkPojo, Serializable, ToCopyableBuilder<GameServer.Builder,GameServer>
This data type is used with the Amazon GameLift FleetIQ and game server groups.
Properties describing a game server that is running on an instance in a GameServerGroup.
A game server is created by a successful call to RegisterGameServer
and deleted by calling
DeregisterGameServer
. A game server is claimed to host a game session by calling
ClaimGameServer
.
Modifier and Type | Class and Description |
---|---|
static interface |
GameServer.Builder |
Modifier and Type | Method and Description |
---|---|
static GameServer.Builder |
builder() |
GameServerClaimStatus |
claimStatus()
Indicates when an available game server has been reserved for gameplay but has not yet started hosting a game.
|
String |
claimStatusAsString()
Indicates when an available game server has been reserved for gameplay but has not yet started hosting a game.
|
String |
connectionInfo()
The port and IP address that must be used to establish a client connection to the game server.
|
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj)
Indicates whether some other object is "equal to" this one by SDK fields.
|
String |
gameServerData()
A set of custom game server properties, formatted as a single string value.
|
String |
gameServerGroupArn()
The ARN identifier for the game server group where the game server is located.
|
String |
gameServerGroupName()
A unique identifier for the game server group where the game server is running.
|
String |
gameServerId()
A custom string that uniquely identifies the game server.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
String |
instanceId()
The unique identifier for the instance where the game server is running.
|
Instant |
lastClaimTime()
Timestamp that indicates the last time the game server was claimed with a ClaimGameServer request.
|
Instant |
lastHealthCheckTime()
Timestamp that indicates the last time the game server was updated with health status using an
UpdateGameServer request.
|
Instant |
registrationTime()
Timestamp that indicates when the game server was created with a RegisterGameServer request.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends GameServer.Builder> |
serializableBuilderClass() |
GameServer.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString()
Returns a string representation of this object.
|
GameServerUtilizationStatus |
utilizationStatus()
Indicates whether the game server is currently available for new games or is busy.
|
String |
utilizationStatusAsString()
Indicates whether the game server is currently available for new games or is busy.
|
copy
public final String gameServerGroupName()
A unique identifier for the game server group where the game server is running. Use either the GameServerGroup name or ARN value.
public final String gameServerGroupArn()
The ARN identifier for the game server group where the game server is located.
public final String gameServerId()
A custom string that uniquely identifies the game server. Game server IDs are developer-defined and are unique across all game server groups in an AWS account.
public final String instanceId()
The unique identifier for the instance where the game server is running. This ID is available in the instance
metadata. EC2 instance IDs use a 17-character format, for example: i-1234567890abcdef0
.
i-1234567890abcdef0
.public final String connectionInfo()
The port and IP address that must be used to establish a client connection to the game server.
public final String gameServerData()
A set of custom game server properties, formatted as a single string value. This data is passed to a game client or service when it requests information on game servers using ListGameServers or ClaimGameServer.
public final GameServerClaimStatus claimStatus()
Indicates when an available game server has been reserved for gameplay but has not yet started hosting a game.
Once it is claimed, the game server remains in CLAIMED
status for a maximum of one minute. During
this time, game clients connect to the game server to start the game and trigger the game server to update its
utilization status. After one minute, the game server claim status reverts to null.
If the service returns an enum value that is not available in the current SDK version, claimStatus
will
return GameServerClaimStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available
from claimStatusAsString()
.
CLAIMED
status for a maximum of one
minute. During this time, game clients connect to the game server to start the game and trigger the game
server to update its utilization status. After one minute, the game server claim status reverts to null.GameServerClaimStatus
public final String claimStatusAsString()
Indicates when an available game server has been reserved for gameplay but has not yet started hosting a game.
Once it is claimed, the game server remains in CLAIMED
status for a maximum of one minute. During
this time, game clients connect to the game server to start the game and trigger the game server to update its
utilization status. After one minute, the game server claim status reverts to null.
If the service returns an enum value that is not available in the current SDK version, claimStatus
will
return GameServerClaimStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available
from claimStatusAsString()
.
CLAIMED
status for a maximum of one
minute. During this time, game clients connect to the game server to start the game and trigger the game
server to update its utilization status. After one minute, the game server claim status reverts to null.GameServerClaimStatus
public final GameServerUtilizationStatus utilizationStatus()
Indicates whether the game server is currently available for new games or is busy. Possible statuses include:
AVAILABLE
- The game server is available to be claimed. A game server that has been claimed remains
in this status until it reports game hosting activity.
UTILIZED
- The game server is currently hosting a game session with players.
If the service returns an enum value that is not available in the current SDK version, utilizationStatus
will return GameServerUtilizationStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is
available from utilizationStatusAsString()
.
AVAILABLE
- The game server is available to be claimed. A game server that has been claimed
remains in this status until it reports game hosting activity.
UTILIZED
- The game server is currently hosting a game session with players.
GameServerUtilizationStatus
public final String utilizationStatusAsString()
Indicates whether the game server is currently available for new games or is busy. Possible statuses include:
AVAILABLE
- The game server is available to be claimed. A game server that has been claimed remains
in this status until it reports game hosting activity.
UTILIZED
- The game server is currently hosting a game session with players.
If the service returns an enum value that is not available in the current SDK version, utilizationStatus
will return GameServerUtilizationStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is
available from utilizationStatusAsString()
.
AVAILABLE
- The game server is available to be claimed. A game server that has been claimed
remains in this status until it reports game hosting activity.
UTILIZED
- The game server is currently hosting a game session with players.
GameServerUtilizationStatus
public final Instant registrationTime()
Timestamp that indicates when the game server was created with a RegisterGameServer request. The format is
a number expressed in Unix time as milliseconds (for example "1469498468.057"
).
"1469498468.057"
).public final Instant lastClaimTime()
Timestamp that indicates the last time the game server was claimed with a ClaimGameServer request. The
format is a number expressed in Unix time as milliseconds (for example "1469498468.057"
). This value
is used to calculate when a claimed game server's status should revert to null.
"1469498468.057"
). This value is used to calculate when a claimed game server's status should revert to null.public final Instant lastHealthCheckTime()
Timestamp that indicates the last time the game server was updated with health status using an
UpdateGameServer request. The format is a number expressed in Unix time as milliseconds (for example
"1469498468.057"
). After game server registration, this property is only changed when a game server
update specifies a health check value.
"1469498468.057"
). After game server registration, this property is only changed
when a game server update specifies a health check value.public GameServer.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<GameServer.Builder,GameServer>
public static GameServer.Builder builder()
public static Class<? extends GameServer.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
SdkPojo
SdkPojo
class,
and is generated based on a service model.
If an SdkPojo
class does not have any inherited fields, equalsBySdkFields
and equals
are essentially the same.
equalsBySdkFields
in interface SdkPojo
obj
- the object to be compared withpublic final String toString()
Copyright © 2021 Amazon Web Services, Inc. All Rights Reserved.