Class PlayerSession
- All Implemented Interfaces:
Serializable
,Cloneable
Properties describing a player session.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
Time stamp indicating when this object was created.Unique identifier for a fleet.Unique identifier for a game session.Game session IP address.Unique identifier for a player.Unique identifier for a player session.Current status of the player session.Time stamp indicating when this fleet was terminated.int
hashCode()
void
setCreationTime
(Date creationTime) Time stamp indicating when this object was created.void
setFleetId
(String fleetId) Unique identifier for a fleet.void
setGameSessionId
(String gameSessionId) Unique identifier for a game session.void
setIpAddress
(String ipAddress) Game session IP address.void
setPlayerId
(String playerId) Unique identifier for a player.void
setPlayerSessionId
(String playerSessionId) Unique identifier for a player session.void
setStatus
(PlayerSessionStatus status) Current status of the player session.void
Current status of the player 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.withFleetId
(String fleetId) Unique identifier for a fleet.withGameSessionId
(String gameSessionId) Unique identifier for a game session.withIpAddress
(String ipAddress) Game session IP address.withPlayerId
(String playerId) Unique identifier for a player.withPlayerSessionId
(String playerSessionId) Unique identifier for a player session.withStatus
(PlayerSessionStatus status) Current status of the player session.withStatus
(String status) Current status of the player session.withTerminationTime
(Date terminationTime) Time stamp indicating when this fleet was terminated.
-
Constructor Details
-
PlayerSession
public PlayerSession()
-
-
Method Details
-
setPlayerSessionId
Unique identifier for a player session.
- Parameters:
playerSessionId
- Unique identifier for a player session.
-
getPlayerSessionId
Unique identifier for a player session.
- Returns:
- Unique identifier for a player session.
-
withPlayerSessionId
Unique identifier for a player session.
- Parameters:
playerSessionId
- Unique identifier for a player session.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPlayerId
Unique identifier for a player.
- Parameters:
playerId
- Unique identifier for a player.
-
getPlayerId
Unique identifier for a player.
- Returns:
- Unique identifier for a player.
-
withPlayerId
Unique identifier for a player.
- Parameters:
playerId
- Unique identifier for a player.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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.
-
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.
-
setStatus
Current status of the player session. Possible player session states include:
- RESERVED: The player session request has been received, but the player has not yet connected to the game server and/or been validated.
- ACTIVE: The player has been validated by the game server and is currently connected.
- COMPLETED: The player connection has been dropped.
- TIMEDOUT: A player session request was received, but the player did not connect and/or was not validated within the time-out limit (60 seconds).
- Parameters:
status
- Current status of the player session. Possible player session states include:- RESERVED: The player session request has been received, but the player has not yet connected to the game server and/or been validated.
- ACTIVE: The player has been validated by the game server and is currently connected.
- COMPLETED: The player connection has been dropped.
- TIMEDOUT: A player session request was received, but the player did not connect and/or was not validated within the time-out limit (60 seconds).
- See Also:
-
getStatus
Current status of the player session. Possible player session states include:
- RESERVED: The player session request has been received, but the player has not yet connected to the game server and/or been validated.
- ACTIVE: The player has been validated by the game server and is currently connected.
- COMPLETED: The player connection has been dropped.
- TIMEDOUT: A player session request was received, but the player did not connect and/or was not validated within the time-out limit (60 seconds).
- Returns:
- Current status of the player session. Possible player session
states include:
- RESERVED: The player session request has been received, but the player has not yet connected to the game server and/or been validated.
- ACTIVE: The player has been validated by the game server and is currently connected.
- COMPLETED: The player connection has been dropped.
- TIMEDOUT: A player session request was received, but the player did not connect and/or was not validated within the time-out limit (60 seconds).
- See Also:
-
withStatus
Current status of the player session. Possible player session states include:
- RESERVED: The player session request has been received, but the player has not yet connected to the game server and/or been validated.
- ACTIVE: The player has been validated by the game server and is currently connected.
- COMPLETED: The player connection has been dropped.
- TIMEDOUT: A player session request was received, but the player did not connect and/or was not validated within the time-out limit (60 seconds).
- Parameters:
status
- Current status of the player session. Possible player session states include:- RESERVED: The player session request has been received, but the player has not yet connected to the game server and/or been validated.
- ACTIVE: The player has been validated by the game server and is currently connected.
- COMPLETED: The player connection has been dropped.
- TIMEDOUT: A player session request was received, but the player did not connect and/or was not validated within the time-out limit (60 seconds).
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setStatus
Current status of the player session. Possible player session states include:
- RESERVED: The player session request has been received, but the player has not yet connected to the game server and/or been validated.
- ACTIVE: The player has been validated by the game server and is currently connected.
- COMPLETED: The player connection has been dropped.
- TIMEDOUT: A player session request was received, but the player did not connect and/or was not validated within the time-out limit (60 seconds).
- Parameters:
status
- Current status of the player session. Possible player session states include:- RESERVED: The player session request has been received, but the player has not yet connected to the game server and/or been validated.
- ACTIVE: The player has been validated by the game server and is currently connected.
- COMPLETED: The player connection has been dropped.
- TIMEDOUT: A player session request was received, but the player did not connect and/or was not validated within the time-out limit (60 seconds).
- See Also:
-
withStatus
Current status of the player session. Possible player session states include:
- RESERVED: The player session request has been received, but the player has not yet connected to the game server and/or been validated.
- ACTIVE: The player has been validated by the game server and is currently connected.
- COMPLETED: The player connection has been dropped.
- TIMEDOUT: A player session request was received, but the player did not connect and/or was not validated within the time-out limit (60 seconds).
- Parameters:
status
- Current status of the player session. Possible player session states include:- RESERVED: The player session request has been received, but the player has not yet connected to the game server and/or been validated.
- ACTIVE: The player has been validated by the game server and is currently connected.
- COMPLETED: The player connection has been dropped.
- TIMEDOUT: A player session request was received, but the player did not connect and/or was not validated within the time-out limit (60 seconds).
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setIpAddress
Game session IP address. All player sessions reference the game session location.
- Parameters:
ipAddress
- Game session IP address. All player sessions reference the game session location.
-
getIpAddress
Game session IP address. All player sessions reference the game session location.
- Returns:
- Game session IP address. All player sessions reference the game session location.
-
withIpAddress
Game session IP address. All player sessions reference the game session location.
- Parameters:
ipAddress
- Game session IP address. All player sessions reference the game session location.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-