Class GameSession
- All Implemented Interfaces:
Serializable
,Cloneable
Properties describing a game session.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
Time stamp indicating when this object was created.Number of players currently in the game session.Unique identifier for a fleet.Set of custom properties for the game session.Unique identifier for a game session.IP address of the game session.Maximum number of players allowed in the game session.getName()
Descriptive label associated with this game session.Indicates whether or not the game session is accepting new players.Current status of the game session.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
Descriptive label associated with this 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
setStatus
(GameSessionStatus status) Current status of the game session.void
Current status of the game session.void
setTerminationTime
(Date terminationTime) Time stamp indicating when this fleet was terminated.toString()
Returns a string representation of this object; useful for testing and debugging.withCreationTime
(Date creationTime) Time stamp indicating when this object was created.withCurrentPlayerSessionCount
(Integer currentPlayerSessionCount) Number of players currently in the game session.withFleetId
(String fleetId) Unique identifier for a fleet.withGameProperties
(GameProperty... gameProperties) Set of custom properties for the game session.withGameProperties
(Collection<GameProperty> gameProperties) Set of custom properties for the game session.withGameSessionId
(String gameSessionId) Unique identifier for a game session.withIpAddress
(String ipAddress) IP address of the game session.withMaximumPlayerSessionCount
(Integer maximumPlayerSessionCount) Maximum number of players allowed in the game session.Descriptive label associated with this game session.withPlayerSessionCreationPolicy
(PlayerSessionCreationPolicy playerSessionCreationPolicy) Indicates whether or not the game session is accepting new players.withPlayerSessionCreationPolicy
(String playerSessionCreationPolicy) Indicates whether or not the game session is accepting new players.withStatus
(GameSessionStatus status) Current status of the game session.withStatus
(String status) Current status of the game session.withTerminationTime
(Date terminationTime) Time stamp indicating when this fleet was terminated.
-
Constructor Details
-
GameSession
public GameSession()
-
-
Method Details
-
setGameSessionId
Unique identifier for a game session.
- Parameters:
gameSessionId
- Unique identifier for a game session.
-
getGameSessionId
Unique identifier for a game session.
- Returns:
- Unique identifier for a game session.
-
withGameSessionId
Unique identifier for a game session.
- Parameters:
gameSessionId
- Unique identifier for a game session.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setName
Descriptive label associated with this game session. Session names do not need to be unique.
- Parameters:
name
- Descriptive label associated with this game session. Session names do not need to be unique.
-
getName
Descriptive label associated with this game session. Session names do not need to be unique.
- Returns:
- Descriptive label associated with this game session. Session names do not need to be unique.
-
withName
Descriptive label associated with this game session. Session names do not need to be unique.
- Parameters:
name
- Descriptive label associated with this 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.
-
setFleetId
Unique identifier for a fleet.
- Parameters:
fleetId
- Unique identifier for a fleet.
-
getFleetId
Unique identifier for a fleet.
- Returns:
- Unique identifier for a fleet.
-
withFleetId
Unique identifier for a fleet.
- Parameters:
fleetId
- Unique identifier for a fleet.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setCreationTime
Time stamp indicating when this object was created. Format is an integer representing the number of seconds since the Unix epoch (Unix time).
- Parameters:
creationTime
- Time stamp indicating when this object was created. Format is an integer representing the number of seconds since the Unix epoch (Unix time).
-
getCreationTime
Time stamp indicating when this object was created. Format is an integer representing the number of seconds since the Unix epoch (Unix time).
- Returns:
- Time stamp indicating when this object was created. Format is an integer representing the number of seconds since the Unix epoch (Unix time).
-
withCreationTime
Time stamp indicating when this object was created. Format is an integer representing the number of seconds since the Unix epoch (Unix time).
- Parameters:
creationTime
- Time stamp indicating when this object was created. Format is an integer representing the number of seconds since the Unix epoch (Unix time).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setTerminationTime
Time stamp indicating when this fleet was terminated. Format is an integer representing the number of seconds since the Unix epoch (Unix time).
- Parameters:
terminationTime
- Time stamp indicating when this fleet was terminated. Format is an integer representing the number of seconds since the Unix epoch (Unix time).
-
getTerminationTime
Time stamp indicating when this fleet was terminated. Format is an integer representing the number of seconds since the Unix epoch (Unix time).
- Returns:
- Time stamp indicating when this fleet was terminated. Format is an integer representing the number of seconds since the Unix epoch (Unix time).
-
withTerminationTime
Time stamp indicating when this fleet was terminated. Format is an integer representing the number of seconds since the Unix epoch (Unix time).
- Parameters:
terminationTime
- Time stamp indicating when this fleet was terminated. Format is an integer representing the number of seconds since the Unix epoch (Unix time).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setCurrentPlayerSessionCount
Number of players currently in the game session.
- Parameters:
currentPlayerSessionCount
- Number of players currently in the game session.
-
getCurrentPlayerSessionCount
Number of players currently in the game session.
- Returns:
- Number of players currently in the game session.
-
withCurrentPlayerSessionCount
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.
-
setMaximumPlayerSessionCount
Maximum number of players allowed in the game session.
- Parameters:
maximumPlayerSessionCount
- Maximum number of players allowed in the game session.
-
getMaximumPlayerSessionCount
Maximum number of players allowed in the game session.
- Returns:
- Maximum number of players allowed in the game session.
-
withMaximumPlayerSessionCount
Maximum number of players allowed in the game session.
- Parameters:
maximumPlayerSessionCount
- Maximum number of players allowed in the game session.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setStatus
Current status of the game session. A game session must be in an ACTIVE state to have player sessions.
- Parameters:
status
- Current status of the game session. A game session must be in an ACTIVE state to have player sessions.- See Also:
-
getStatus
Current status of the game session. A game session must be in an ACTIVE state to have player sessions.
- Returns:
- Current status of the game session. A game session must be in an ACTIVE state to have player sessions.
- See Also:
-
withStatus
Current status of the game session. A game session must be in an ACTIVE state to have player sessions.
- Parameters:
status
- Current status of the game session. A game session must be in an ACTIVE state to have player sessions.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setStatus
Current status of the game session. A game session must be in an ACTIVE state to have player sessions.
- Parameters:
status
- Current status of the game session. A game session must be in an ACTIVE state to have player sessions.- See Also:
-
withStatus
Current status of the game session. A game session must be in an ACTIVE state to have player sessions.
- Parameters:
status
- Current status of the game session. A game session must be in an ACTIVE state to have player sessions.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
getGameProperties
Set of custom properties for the game session.
- Returns:
- Set of custom properties for the game session.
-
setGameProperties
Set of custom properties for the game session.
- Parameters:
gameProperties
- Set of custom properties for the game session.
-
withGameProperties
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)
orwithGameProperties(java.util.Collection)
if you want to override the existing values.- Parameters:
gameProperties
- Set of custom properties for the game session.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withGameProperties
Set of custom properties for the game session.
- Parameters:
gameProperties
- Set of custom properties for the game session.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setIpAddress
IP address of the game session.
- Parameters:
ipAddress
- IP address of the game session.
-
getIpAddress
IP address of the game session.
- Returns:
- IP address of the game session.
-
withIpAddress
IP address of the game session.
- Parameters:
ipAddress
- IP address of the game session.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPlayerSessionCreationPolicy
Indicates whether or not the game session is accepting new players.
- Parameters:
playerSessionCreationPolicy
- Indicates whether or not the game session is accepting new players.- See Also:
-
getPlayerSessionCreationPolicy
Indicates whether or not the game session is accepting new players.
- Returns:
- Indicates whether or not the game session is accepting new players.
- See Also:
-
withPlayerSessionCreationPolicy
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:
-
setPlayerSessionCreationPolicy
Indicates whether or not the game session is accepting new players.
- Parameters:
playerSessionCreationPolicy
- Indicates whether or not the game session is accepting new players.- See Also:
-
withPlayerSessionCreationPolicy
public GameSession withPlayerSessionCreationPolicy(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:
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-