public class GameSession extends Object implements Serializable, Cloneable
Properties describing a game session.
Constructor and Description |
---|
GameSession() |
Modifier and Type | Method and Description |
---|---|
GameSession |
clone() |
boolean |
equals(Object obj) |
Date |
getCreationTime()
Time stamp indicating when this data object was created.
|
String |
getCreatorId()
Player ID of the person or entity that created the game session.
|
Integer |
getCurrentPlayerSessionCount()
Number of players currently in the game session.
|
String |
getFleetId()
Unique identifier for a fleet.
|
List<GameProperty> |
getGameProperties()
Set of custom properties for the game session.
|
String |
getGameSessionId()
Unique identifier for a game session.
|
String |
getIpAddress()
IP address of the game session.
|
Integer |
getMaximumPlayerSessionCount()
Maximum number of players allowed in the game session.
|
String |
getName()
Descriptive label associated with a game session.
|
String |
getPlayerSessionCreationPolicy()
Indicates whether or not the game session is accepting new players.
|
Integer |
getPort()
Port number for the game session.
|
String |
getStatus()
Current status of the game session.
|
Date |
getTerminationTime()
Time stamp indicating when this data object was terminated.
|
int |
hashCode() |
void |
setCreationTime(Date creationTime)
Time stamp indicating when this data object was created.
|
void |
setCreatorId(String creatorId)
Player ID of the person or entity that created the game session.
|
void |
setCurrentPlayerSessionCount(Integer currentPlayerSessionCount)
Number of players currently in the game session.
|
void |
setFleetId(String fleetId)
Unique identifier for a fleet.
|
void |
setGameProperties(Collection<GameProperty> gameProperties)
Set of custom properties for the game session.
|
void |
setGameSessionId(String gameSessionId)
Unique identifier for a game session.
|
void |
setIpAddress(String ipAddress)
IP address of the game session.
|
void |
setMaximumPlayerSessionCount(Integer maximumPlayerSessionCount)
Maximum number of players allowed in the game session.
|
void |
setName(String name)
Descriptive label associated with a game session.
|
void |
setPlayerSessionCreationPolicy(PlayerSessionCreationPolicy playerSessionCreationPolicy)
Indicates whether or not the game session is accepting new players.
|
void |
setPlayerSessionCreationPolicy(String playerSessionCreationPolicy)
Indicates whether or not the game session is accepting new players.
|
void |
setPort(Integer port)
Port number for the game session.
|
void |
setStatus(GameSessionStatus status)
Current status of the game session.
|
void |
setStatus(String status)
Current status of the game session.
|
void |
setTerminationTime(Date terminationTime)
Time stamp indicating when this data object was terminated.
|
String |
toString()
Returns a string representation of this object; useful for testing and debugging.
|
GameSession |
withCreationTime(Date creationTime)
Time stamp indicating when this data object was created.
|
GameSession |
withCreatorId(String creatorId)
Player ID of the person or entity that created the game session.
|
GameSession |
withCurrentPlayerSessionCount(Integer currentPlayerSessionCount)
Number of players currently in the game session.
|
GameSession |
withFleetId(String fleetId)
Unique identifier for a fleet.
|
GameSession |
withGameProperties(Collection<GameProperty> gameProperties)
Set of custom properties for the game session.
|
GameSession |
withGameProperties(GameProperty... gameProperties)
Set of custom properties for the game session.
|
GameSession |
withGameSessionId(String gameSessionId)
Unique identifier for a game session.
|
GameSession |
withIpAddress(String ipAddress)
IP address of the game session.
|
GameSession |
withMaximumPlayerSessionCount(Integer maximumPlayerSessionCount)
Maximum number of players allowed in the game session.
|
GameSession |
withName(String name)
Descriptive label associated with a game session.
|
GameSession |
withPlayerSessionCreationPolicy(PlayerSessionCreationPolicy playerSessionCreationPolicy)
Indicates whether or not the game session is accepting new players.
|
GameSession |
withPlayerSessionCreationPolicy(String playerSessionCreationPolicy)
Indicates whether or not the game session is accepting new players.
|
GameSession |
withPort(Integer port)
Port number for the game session.
|
GameSession |
withStatus(GameSessionStatus status)
Current status of the game session.
|
GameSession |
withStatus(String status)
Current status of the game session.
|
GameSession |
withTerminationTime(Date terminationTime)
Time stamp indicating when this data object was terminated.
|
public void setGameSessionId(String gameSessionId)
Unique identifier for a game session. Game session ID format is as follows: "arn:aws:gamelift:<region>::gamesession/fleet-<fleet ID>/<ID string>". The value of <ID string> is either a custom ID string (if one was specified when the game session was created) an autogenerated string.
gameSessionId
- Unique identifier for a game session. Game session ID format is as follows:
"arn:aws:gamelift:<region>::gamesession/fleet-<fleet ID>/<ID string>". The value of
<ID string> is either a custom ID string (if one was specified when the game session was created) an
autogenerated string.public String getGameSessionId()
Unique identifier for a game session. Game session ID format is as follows: "arn:aws:gamelift:<region>::gamesession/fleet-<fleet ID>/<ID string>". The value of <ID string> is either a custom ID string (if one was specified when the game session was created) an autogenerated string.
public GameSession withGameSessionId(String gameSessionId)
Unique identifier for a game session. Game session ID format is as follows: "arn:aws:gamelift:<region>::gamesession/fleet-<fleet ID>/<ID string>". The value of <ID string> is either a custom ID string (if one was specified when the game session was created) an autogenerated string.
gameSessionId
- Unique identifier for a game session. Game session ID format is as follows:
"arn:aws:gamelift:<region>::gamesession/fleet-<fleet ID>/<ID string>". The value of
<ID string> is either a custom ID string (if one was specified when the game session was created) an
autogenerated string.public void setName(String name)
Descriptive label associated with a game session. Session names do not need to be unique.
name
- Descriptive label associated with a game session. Session names do not need to be unique.public String getName()
Descriptive label associated with a game session. Session names do not need to be unique.
public GameSession withName(String name)
Descriptive label associated with a game session. Session names do not need to be unique.
name
- Descriptive label associated with a game session. Session names do not need to be unique.public void setFleetId(String fleetId)
Unique identifier for a fleet.
fleetId
- Unique identifier for a fleet.public String getFleetId()
Unique identifier for a fleet.
public GameSession withFleetId(String fleetId)
Unique identifier for a fleet.
fleetId
- Unique identifier for a fleet.public void setCreationTime(Date creationTime)
Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (ex: "1469498468.057").
creationTime
- Time stamp indicating when this data object was created. Format is a number expressed in Unix time as
milliseconds (ex: "1469498468.057").public Date getCreationTime()
Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (ex: "1469498468.057").
public GameSession withCreationTime(Date creationTime)
Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (ex: "1469498468.057").
creationTime
- Time stamp indicating when this data object was created. Format is a number expressed in Unix time as
milliseconds (ex: "1469498468.057").public void setTerminationTime(Date terminationTime)
Time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (ex: "1469498468.057").
terminationTime
- Time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as
milliseconds (ex: "1469498468.057").public Date getTerminationTime()
Time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (ex: "1469498468.057").
public GameSession withTerminationTime(Date terminationTime)
Time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (ex: "1469498468.057").
terminationTime
- Time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as
milliseconds (ex: "1469498468.057").public void setCurrentPlayerSessionCount(Integer currentPlayerSessionCount)
Number of players currently in the game session.
currentPlayerSessionCount
- Number of players currently in the game session.public Integer getCurrentPlayerSessionCount()
Number of players currently in the game session.
public GameSession withCurrentPlayerSessionCount(Integer currentPlayerSessionCount)
Number of players currently in the game session.
currentPlayerSessionCount
- Number of players currently in the game session.public void setMaximumPlayerSessionCount(Integer maximumPlayerSessionCount)
Maximum number of players allowed in the game session.
maximumPlayerSessionCount
- Maximum number of players allowed in the game session.public Integer getMaximumPlayerSessionCount()
Maximum number of players allowed in the game session.
public GameSession withMaximumPlayerSessionCount(Integer maximumPlayerSessionCount)
Maximum number of players allowed in the game session.
maximumPlayerSessionCount
- Maximum number of players allowed in the game session.public void setStatus(String status)
Current status of the game session. A game session must be in an ACTIVE
status to have player
sessions.
status
- Current status of the game session. A game session must be in an ACTIVE
status to have player
sessions.GameSessionStatus
public String getStatus()
Current status of the game session. A game session must be in an ACTIVE
status to have player
sessions.
ACTIVE
status to have
player sessions.GameSessionStatus
public GameSession withStatus(String status)
Current status of the game session. A game session must be in an ACTIVE
status to have player
sessions.
status
- Current status of the game session. A game session must be in an ACTIVE
status to have player
sessions.GameSessionStatus
public void setStatus(GameSessionStatus status)
Current status of the game session. A game session must be in an ACTIVE
status to have player
sessions.
status
- Current status of the game session. A game session must be in an ACTIVE
status to have player
sessions.GameSessionStatus
public GameSession withStatus(GameSessionStatus status)
Current status of the game session. A game session must be in an ACTIVE
status to have player
sessions.
status
- Current status of the game session. A game session must be in an ACTIVE
status to have player
sessions.GameSessionStatus
public List<GameProperty> getGameProperties()
Set of custom properties for the game session.
public void setGameProperties(Collection<GameProperty> gameProperties)
Set of custom properties for the game session.
gameProperties
- Set of custom properties for the game session.public GameSession withGameProperties(GameProperty... gameProperties)
Set of custom properties for the game session.
NOTE: This method appends the values to the existing list (if any). Use
setGameProperties(java.util.Collection)
or withGameProperties(java.util.Collection)
if you want
to override the existing values.
gameProperties
- Set of custom properties for the game session.public GameSession withGameProperties(Collection<GameProperty> gameProperties)
Set of custom properties for the game session.
gameProperties
- Set of custom properties for the game session.public void setIpAddress(String ipAddress)
IP address of the game session. To connect to a GameLift server process, an app needs both the IP address and port number.
ipAddress
- IP address of the game session. To connect to a GameLift server process, an app needs both the IP address
and port number.public String getIpAddress()
IP address of the game session. To connect to a GameLift server process, an app needs both the IP address and port number.
public GameSession withIpAddress(String ipAddress)
IP address of the game session. To connect to a GameLift server process, an app needs both the IP address and port number.
ipAddress
- IP address of the game session. To connect to a GameLift server process, an app needs both the IP address
and port number.public void setPort(Integer port)
Port number for the game session. To connect to a GameLift server process, an app needs both the IP address and port number.
port
- Port number for the game session. To connect to a GameLift server process, an app needs both the IP
address and port number.public Integer getPort()
Port number for the game session. To connect to a GameLift server process, an app needs both the IP address and port number.
public GameSession withPort(Integer port)
Port number for the game session. To connect to a GameLift server process, an app needs both the IP address and port number.
port
- Port number for the game session. To connect to a GameLift server process, an app needs both the IP
address and port number.public void setPlayerSessionCreationPolicy(String playerSessionCreationPolicy)
Indicates whether or not the game session is accepting new players.
playerSessionCreationPolicy
- Indicates whether or not the game session is accepting new players.PlayerSessionCreationPolicy
public String getPlayerSessionCreationPolicy()
Indicates whether or not the game session is accepting new players.
PlayerSessionCreationPolicy
public GameSession withPlayerSessionCreationPolicy(String playerSessionCreationPolicy)
Indicates whether or not the game session is accepting new players.
playerSessionCreationPolicy
- Indicates whether or not the game session is accepting new players.PlayerSessionCreationPolicy
public void setPlayerSessionCreationPolicy(PlayerSessionCreationPolicy playerSessionCreationPolicy)
Indicates whether or not the game session is accepting new players.
playerSessionCreationPolicy
- Indicates whether or not the game session is accepting new players.PlayerSessionCreationPolicy
public GameSession withPlayerSessionCreationPolicy(PlayerSessionCreationPolicy playerSessionCreationPolicy)
Indicates whether or not the game session is accepting new players.
playerSessionCreationPolicy
- Indicates whether or not the game session is accepting new players.PlayerSessionCreationPolicy
public void setCreatorId(String creatorId)
Player ID of the person or entity that created the game session. This ID is used to enforce a resource protection policy (if one exists) that limits the number of concurrent active game sessions for a single player.
creatorId
- Player ID of the person or entity that created the game session. This ID is used to enforce a resource
protection policy (if one exists) that limits the number of concurrent active game sessions for a single
player.public String getCreatorId()
Player ID of the person or entity that created the game session. This ID is used to enforce a resource protection policy (if one exists) that limits the number of concurrent active game sessions for a single player.
public GameSession withCreatorId(String creatorId)
Player ID of the person or entity that created the game session. This ID is used to enforce a resource protection policy (if one exists) that limits the number of concurrent active game sessions for a single player.
creatorId
- Player ID of the person or entity that created the game session. This ID is used to enforce a resource
protection policy (if one exists) that limits the number of concurrent active game sessions for a single
player.public String toString()
toString
in class Object
Object.toString()
public GameSession clone()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.