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:
  • Constructor Details

    • PlayerSession

      public PlayerSession()
  • Method Details

    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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 class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public PlayerSession clone()
      Overrides:
      clone in class Object