|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectclient.framework.models.Session
public class Session
This class is a model representing a session running on the server to which the client is connected. The session consist of an id, a name, a number of connected players, and a maximum number of players.
Constructor Summary | |
---|---|
Session(int id,
java.lang.String name,
int nofPlayers,
int maxPlayers)
Constructor that creates a Session object
with the specified attributes. |
|
Session(java.lang.String[] values)
Creates a new Session object, where the
session's attributes are contained in an array. |
Method Summary | |
---|---|
int |
getId()
Returns the session's id. |
int |
getMaxPlayers()
Returns the session's maximum number of players. |
java.lang.String |
getName()
Returns the session's name. |
int |
getNofPlayers()
Returns the session's number of currently connected players. |
java.lang.String |
toString()
Returns a string representation of the session. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Session(int id, java.lang.String name, int nofPlayers, int maxPlayers)
Session
object
with the specified attributes.
id
- The session's id.name
- The session's name.nofPlayers
- The number of currently connected players.maxPlayers
- The maximum number of players.public Session(java.lang.String[] values)
Session
object, where the
session's attributes are contained in an array.
values
- The session's attributes.Session(int, String, int, int)
Method Detail |
---|
public java.lang.String toString()
SessionView
to list the server's active sessions,
and their attributes.
toString
in class java.lang.Object
public int getId()
public java.lang.String getName()
public int getNofPlayers()
public int getMaxPlayers()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |