|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Room
Every type of room where a client can be needs to be able to handle incoming messages.
Field Summary | |
---|---|
static int |
ADD_USER
|
static int |
CHAT
|
static int |
COLOR_CHANGE
|
static int |
CREATE
|
static int |
DRAW
|
static int |
END_SESSION
|
static int |
ERASE
|
static int |
ERROR
|
static int |
GAME_INFO
|
static int |
JOIN
|
static int |
LEAVE_GAME
|
static int |
LOGIN
|
static int |
LOGOUT
|
static int |
NEW_ILLUSTRATOR
|
static int |
REMOVE_USER
|
static int |
SIZE_CHANGE
|
static int |
START
|
static int |
STOP
|
static int |
TOPIC_REQUEST
|
Method Summary | |
---|---|
void |
addNewClient(Client newClient)
Adds a new client to the room |
boolean |
containsUser(java.lang.String userName)
Checks to see if a given user is in the room. |
void |
handleMsg(java.lang.String msg,
Client sender)
Handles a message from the client. |
Client |
removeClient(java.lang.String userName)
Remove a client from the room. |
Field Detail |
---|
static final int ERROR
static final int DRAW
static final int ERASE
static final int COLOR_CHANGE
static final int SIZE_CHANGE
static final int LOGIN
static final int LOGOUT
static final int CREATE
static final int JOIN
static final int START
static final int STOP
static final int LEAVE_GAME
static final int END_SESSION
static final int GAME_INFO
static final int TOPIC_REQUEST
static final int CHAT
static final int ADD_USER
static final int REMOVE_USER
static final int NEW_ILLUSTRATOR
Method Detail |
---|
void handleMsg(java.lang.String msg, Client sender)
msg
- message from clientsender
- the client that send the messagevoid addNewClient(Client newClient)
newClient
- The client that is to be added to the roomClient removeClient(java.lang.String userName)
userName
- The name of the client that is being removed
boolean containsUser(java.lang.String userName)
userName
- the user name to search for
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |