Class PlayerSession
- java.lang.Object
-
- com.amazonaws.services.gamelift.model.PlayerSession
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class PlayerSession extends Object implements Serializable, Cloneable
Properties describing a player session.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PlayerSession()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PlayerSession
clone()
boolean
equals(Object obj)
Date
getCreationTime()
Time stamp indicating when this object was created.String
getFleetId()
Unique identifier for a fleet.String
getGameSessionId()
Unique identifier for a game session.String
getIpAddress()
Game session IP address.String
getPlayerId()
Unique identifier for a player.String
getPlayerSessionId()
Unique identifier for a player session.String
getStatus()
Current status of the player 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
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
setStatus(String status)
Current status of the player 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.PlayerSession
withCreationTime(Date creationTime)
Time stamp indicating when this object was created.PlayerSession
withFleetId(String fleetId)
Unique identifier for a fleet.PlayerSession
withGameSessionId(String gameSessionId)
Unique identifier for a game session.PlayerSession
withIpAddress(String ipAddress)
Game session IP address.PlayerSession
withPlayerId(String playerId)
Unique identifier for a player.PlayerSession
withPlayerSessionId(String playerSessionId)
Unique identifier for a player session.PlayerSession
withStatus(PlayerSessionStatus status)
Current status of the player session.PlayerSession
withStatus(String status)
Current status of the player session.PlayerSession
withTerminationTime(Date terminationTime)
Time stamp indicating when this fleet was terminated.
-
-
-
Method Detail
-
setPlayerSessionId
public void setPlayerSessionId(String playerSessionId)
Unique identifier for a player session.
- Parameters:
playerSessionId
- Unique identifier for a player session.
-
getPlayerSessionId
public String getPlayerSessionId()
Unique identifier for a player session.
- Returns:
- Unique identifier for a player session.
-
withPlayerSessionId
public PlayerSession withPlayerSessionId(String playerSessionId)
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
public void setPlayerId(String playerId)
Unique identifier for a player.
- Parameters:
playerId
- Unique identifier for a player.
-
getPlayerId
public String getPlayerId()
Unique identifier for a player.
- Returns:
- Unique identifier for a player.
-
withPlayerId
public PlayerSession withPlayerId(String playerId)
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
public void setGameSessionId(String gameSessionId)
Unique identifier for a game session.
- Parameters:
gameSessionId
- Unique identifier for a game session.
-
getGameSessionId
public String getGameSessionId()
Unique identifier for a game session.
- Returns:
- Unique identifier for a game session.
-
withGameSessionId
public PlayerSession withGameSessionId(String gameSessionId)
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
public void setFleetId(String fleetId)
Unique identifier for a fleet.
- Parameters:
fleetId
- Unique identifier for a fleet.
-
getFleetId
public String getFleetId()
Unique identifier for a fleet.
- Returns:
- Unique identifier for a fleet.
-
withFleetId
public PlayerSession withFleetId(String fleetId)
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
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).
- 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
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).
- 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
public PlayerSession 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).
- 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
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).
- 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
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).
- 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
public PlayerSession 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).
- 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
public void setStatus(String 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).
- 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:
PlayerSessionStatus
-
getStatus
public String 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:
PlayerSessionStatus
-
withStatus
public PlayerSession withStatus(String 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).
- 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:
PlayerSessionStatus
-
setStatus
public void setStatus(PlayerSessionStatus 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).
- 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:
PlayerSessionStatus
-
withStatus
public PlayerSession withStatus(PlayerSessionStatus 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).
- 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:
PlayerSessionStatus
-
setIpAddress
public void setIpAddress(String ipAddress)
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
public String 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
public PlayerSession withIpAddress(String ipAddress)
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
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public PlayerSession clone()
-
-