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 object was created.
|
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 fleet was terminated.
|
int |
hashCode() |
void |
setCreationTime(Date creationTime)
Time stamp indicating when this object was created.
|
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 fleet 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 object was created.
|
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 fleet was terminated.
|
public void setGameSessionId(String gameSessionId)
Unique identifier for a game session.
gameSessionId
- Unique identifier for a game session.public String getGameSessionId()
Unique identifier for a game session.
public GameSession withGameSessionId(String gameSessionId)
Unique identifier for a game session.
gameSessionId
- Unique identifier for a game session.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 object was created. Format is an integer representing the number of seconds since the Unix epoch (Unix time).
creationTime
- Time stamp indicating when this object was created. Format is an
integer representing the number of seconds since the Unix epoch
(Unix time).public Date getCreationTime()
Time stamp indicating when this object was created. Format is an integer representing the number of seconds since the Unix epoch (Unix time).
public GameSession withCreationTime(Date creationTime)
Time stamp indicating when this object was created. Format is an integer representing the number of seconds since the Unix epoch (Unix time).
creationTime
- Time stamp indicating when this object was created. Format is an
integer representing the number of seconds since the Unix epoch
(Unix time).public void setTerminationTime(Date terminationTime)
Time stamp indicating when this fleet was terminated. Format is an integer representing the number of seconds since the Unix epoch (Unix time).
terminationTime
- Time stamp indicating when this fleet was terminated. Format is an
integer representing the number of seconds since the Unix epoch
(Unix time).public Date getTerminationTime()
Time stamp indicating when this fleet was terminated. Format is an integer representing the number of seconds since the Unix epoch (Unix time).
public GameSession withTerminationTime(Date terminationTime)
Time stamp indicating when this fleet was terminated. Format is an integer representing the number of seconds since the Unix epoch (Unix time).
terminationTime
- Time stamp indicating when this fleet was terminated. Format is an
integer representing the number of seconds since the Unix epoch
(Unix time).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
state to have player sessions.
status
- Current status of the game session. A game session must be in an
ACTIVE
state to have player sessions.GameSessionStatus
public String getStatus()
Current status of the game session. A game session must be in an
ACTIVE
state to have player sessions.
ACTIVE
state to have player sessions.GameSessionStatus
public GameSession withStatus(String status)
Current status of the game session. A game session must be in an
ACTIVE
state to have player sessions.
status
- Current status of the game session. A game session must be in an
ACTIVE
state to have player sessions.GameSessionStatus
public void setStatus(GameSessionStatus status)
Current status of the game session. A game session must be in an
ACTIVE
state to have player sessions.
status
- Current status of the game session. A game session must be in an
ACTIVE
state to have player sessions.GameSessionStatus
public GameSession withStatus(GameSessionStatus status)
Current status of the game session. A game session must be in an
ACTIVE
state to have player sessions.
status
- Current status of the game session. A game session must be in an
ACTIVE
state 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 String toString()
toString
in class Object
Object.toString()
public GameSession clone()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.