public class GameSession
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Properties describing a game session.
Modifier and Type | Field and Description |
---|---|
private java.util.Date |
creationTime
Time stamp indicating when this object was created.
|
private java.lang.Integer |
currentPlayerSessionCount
Number of players currently in the game session.
|
private java.lang.String |
fleetId
Unique identifier for a fleet.
|
private java.util.List<GameProperty> |
gameProperties
Set of custom properties for the game session.
|
private java.lang.String |
gameSessionId
Unique identifier for a game session.
|
private java.lang.String |
ipAddress
IP address of the game session.
|
private java.lang.Integer |
maximumPlayerSessionCount
Maximum number of players allowed in the game session.
|
private java.lang.String |
name
Descriptive label associated with this game session.
|
private java.lang.String |
playerSessionCreationPolicy
Indicates whether or not the game session is accepting new players.
|
private java.lang.String |
status
Current status of the game session.
|
private java.util.Date |
terminationTime
Time stamp indicating when this fleet was terminated.
|
Constructor and Description |
---|
GameSession() |
Modifier and Type | Method and Description |
---|---|
GameSession |
clone() |
boolean |
equals(java.lang.Object obj) |
java.util.Date |
getCreationTime()
Time stamp indicating when this object was created.
|
java.lang.Integer |
getCurrentPlayerSessionCount()
Number of players currently in the game session.
|
java.lang.String |
getFleetId()
Unique identifier for a fleet.
|
java.util.List<GameProperty> |
getGameProperties()
Set of custom properties for the game session.
|
java.lang.String |
getGameSessionId()
Unique identifier for a game session.
|
java.lang.String |
getIpAddress()
IP address of the game session.
|
java.lang.Integer |
getMaximumPlayerSessionCount()
Maximum number of players allowed in the game session.
|
java.lang.String |
getName()
Descriptive label associated with this game session.
|
java.lang.String |
getPlayerSessionCreationPolicy()
Indicates whether or not the game session is accepting new players.
|
java.lang.String |
getStatus()
Current status of the game session.
|
java.util.Date |
getTerminationTime()
Time stamp indicating when this fleet was terminated.
|
int |
hashCode() |
void |
setCreationTime(java.util.Date creationTime)
Time stamp indicating when this object was created.
|
void |
setCurrentPlayerSessionCount(java.lang.Integer currentPlayerSessionCount)
Number of players currently in the game session.
|
void |
setFleetId(java.lang.String fleetId)
Unique identifier for a fleet.
|
void |
setGameProperties(java.util.Collection<GameProperty> gameProperties)
Set of custom properties for the game session.
|
void |
setGameSessionId(java.lang.String gameSessionId)
Unique identifier for a game session.
|
void |
setIpAddress(java.lang.String ipAddress)
IP address of the game session.
|
void |
setMaximumPlayerSessionCount(java.lang.Integer maximumPlayerSessionCount)
Maximum number of players allowed in the game session.
|
void |
setName(java.lang.String name)
Descriptive label associated with this game session.
|
void |
setPlayerSessionCreationPolicy(PlayerSessionCreationPolicy playerSessionCreationPolicy)
Indicates whether or not the game session is accepting new players.
|
void |
setPlayerSessionCreationPolicy(java.lang.String playerSessionCreationPolicy)
Indicates whether or not the game session is accepting new players.
|
void |
setStatus(GameSessionStatus status)
Current status of the game session.
|
void |
setStatus(java.lang.String status)
Current status of the game session.
|
void |
setTerminationTime(java.util.Date terminationTime)
Time stamp indicating when this fleet was terminated.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
GameSession |
withCreationTime(java.util.Date creationTime)
Time stamp indicating when this object was created.
|
GameSession |
withCurrentPlayerSessionCount(java.lang.Integer currentPlayerSessionCount)
Number of players currently in the game session.
|
GameSession |
withFleetId(java.lang.String fleetId)
Unique identifier for a fleet.
|
GameSession |
withGameProperties(java.util.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(java.lang.String gameSessionId)
Unique identifier for a game session.
|
GameSession |
withIpAddress(java.lang.String ipAddress)
IP address of the game session.
|
GameSession |
withMaximumPlayerSessionCount(java.lang.Integer maximumPlayerSessionCount)
Maximum number of players allowed in the game session.
|
GameSession |
withName(java.lang.String name)
Descriptive label associated with this game session.
|
GameSession |
withPlayerSessionCreationPolicy(PlayerSessionCreationPolicy playerSessionCreationPolicy)
Indicates whether or not the game session is accepting new players.
|
GameSession |
withPlayerSessionCreationPolicy(java.lang.String playerSessionCreationPolicy)
Indicates whether or not the game session is accepting new players.
|
GameSession |
withStatus(GameSessionStatus status)
Current status of the game session.
|
GameSession |
withStatus(java.lang.String status)
Current status of the game session.
|
GameSession |
withTerminationTime(java.util.Date terminationTime)
Time stamp indicating when this fleet was terminated.
|
private java.lang.String gameSessionId
Unique identifier for a game session.
private java.lang.String name
Descriptive label associated with this game session. Session names do not need to be unique.
private java.lang.String fleetId
Unique identifier for a fleet.
private java.util.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).
private java.util.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).
private java.lang.Integer currentPlayerSessionCount
Number of players currently in the game session.
private java.lang.Integer maximumPlayerSessionCount
Maximum number of players allowed in the game session.
private java.lang.String status
Current status of the game session. A game session must be in an ACTIVE state to have player sessions.
private java.util.List<GameProperty> gameProperties
Set of custom properties for the game session.
private java.lang.String ipAddress
IP address of the game session.
private java.lang.String playerSessionCreationPolicy
Indicates whether or not the game session is accepting new players.
public void setGameSessionId(java.lang.String gameSessionId)
Unique identifier for a game session.
gameSessionId
- Unique identifier for a game session.public java.lang.String getGameSessionId()
Unique identifier for a game session.
public GameSession withGameSessionId(java.lang.String gameSessionId)
Unique identifier for a game session.
gameSessionId
- Unique identifier for a game session.public void setName(java.lang.String name)
Descriptive label associated with this game session. Session names do not need to be unique.
name
- Descriptive label associated with this game session. Session names
do not need to be unique.public java.lang.String getName()
Descriptive label associated with this game session. Session names do not need to be unique.
public GameSession withName(java.lang.String name)
Descriptive label associated with this game session. Session names do not need to be unique.
name
- Descriptive label associated with this game session. Session names
do not need to be unique.public void setFleetId(java.lang.String fleetId)
Unique identifier for a fleet.
fleetId
- Unique identifier for a fleet.public java.lang.String getFleetId()
Unique identifier for a fleet.
public GameSession withFleetId(java.lang.String fleetId)
Unique identifier for a fleet.
fleetId
- Unique identifier for a fleet.public void setCreationTime(java.util.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 java.util.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(java.util.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(java.util.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 java.util.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(java.util.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(java.lang.Integer currentPlayerSessionCount)
Number of players currently in the game session.
currentPlayerSessionCount
- Number of players currently in the game session.public java.lang.Integer getCurrentPlayerSessionCount()
Number of players currently in the game session.
public GameSession withCurrentPlayerSessionCount(java.lang.Integer currentPlayerSessionCount)
Number of players currently in the game session.
currentPlayerSessionCount
- Number of players currently in the game session.public void setMaximumPlayerSessionCount(java.lang.Integer maximumPlayerSessionCount)
Maximum number of players allowed in the game session.
maximumPlayerSessionCount
- Maximum number of players allowed in the game session.public java.lang.Integer getMaximumPlayerSessionCount()
Maximum number of players allowed in the game session.
public GameSession withMaximumPlayerSessionCount(java.lang.Integer maximumPlayerSessionCount)
Maximum number of players allowed in the game session.
maximumPlayerSessionCount
- Maximum number of players allowed in the game session.public void setStatus(java.lang.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 java.lang.String getStatus()
Current status of the game session. A game session must be in an ACTIVE state to have player sessions.
GameSessionStatus
public GameSession withStatus(java.lang.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 java.util.List<GameProperty> getGameProperties()
Set of custom properties for the game session.
public void setGameProperties(java.util.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(java.util.Collection<GameProperty> gameProperties)
Set of custom properties for the game session.
gameProperties
- Set of custom properties for the game session.public void setIpAddress(java.lang.String ipAddress)
IP address of the game session.
ipAddress
- IP address of the game session.public java.lang.String getIpAddress()
IP address of the game session.
public GameSession withIpAddress(java.lang.String ipAddress)
IP address of the game session.
ipAddress
- IP address of the game session.public void setPlayerSessionCreationPolicy(java.lang.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 java.lang.String getPlayerSessionCreationPolicy()
Indicates whether or not the game session is accepting new players.
PlayerSessionCreationPolicy
public GameSession withPlayerSessionCreationPolicy(java.lang.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 java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public GameSession clone()
clone
in class java.lang.Object