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 PlayerSessionclone()booleanequals(Object obj)DategetCreationTime()Time stamp indicating when this object was created.StringgetFleetId()Unique identifier for a fleet.StringgetGameSessionId()Unique identifier for a game session.StringgetIpAddress()Game session IP address.StringgetPlayerId()Unique identifier for a player.StringgetPlayerSessionId()Unique identifier for a player session.StringgetStatus()Current status of the player session.DategetTerminationTime()Time stamp indicating when this fleet was terminated.inthashCode()voidsetCreationTime(Date creationTime)Time stamp indicating when this object was created.voidsetFleetId(String fleetId)Unique identifier for a fleet.voidsetGameSessionId(String gameSessionId)Unique identifier for a game session.voidsetIpAddress(String ipAddress)Game session IP address.voidsetPlayerId(String playerId)Unique identifier for a player.voidsetPlayerSessionId(String playerSessionId)Unique identifier for a player session.voidsetStatus(PlayerSessionStatus status)Current status of the player session.voidsetStatus(String status)Current status of the player session.voidsetTerminationTime(Date terminationTime)Time stamp indicating when this fleet was terminated.StringtoString()Returns a string representation of this object; useful for testing and debugging.PlayerSessionwithCreationTime(Date creationTime)Time stamp indicating when this object was created.PlayerSessionwithFleetId(String fleetId)Unique identifier for a fleet.PlayerSessionwithGameSessionId(String gameSessionId)Unique identifier for a game session.PlayerSessionwithIpAddress(String ipAddress)Game session IP address.PlayerSessionwithPlayerId(String playerId)Unique identifier for a player.PlayerSessionwithPlayerSessionId(String playerSessionId)Unique identifier for a player session.PlayerSessionwithStatus(PlayerSessionStatus status)Current status of the player session.PlayerSessionwithStatus(String status)Current status of the player session.PlayerSessionwithTerminationTime(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:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public PlayerSession clone()
-
-