|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCards304Server
public class Cards304Server
This Cards304Server class represents the server actoins of this network based 304 card game. This class is mostly used to send and recieve messages to the and from the client class.
Nested Class Summary | |
---|---|
private class |
Cards304Server.ClientHandler
This ClientHandler class is to run Thread and listen to client messages. |
Field Summary | |
---|---|
private java.util.ArrayList |
clientOutputStreams
|
private int |
gameId
|
(package private) Game[] |
games
|
private int |
playerId
|
Constructor Summary | |
---|---|
Cards304Server()
Constructor method of this Cards304Server class. |
Method Summary | |
---|---|
int |
getGameId()
This method returns gameId |
int |
getPlayerId()
This method returns playerID |
void |
go()
This method is to setup the network connection with Card304Client class. |
static void |
main(java.lang.String[] args)
|
void |
takeAction(java.lang.String srvMsg)
This method is to take action for all the client messages. |
void |
tellEveryone(java.lang.String message)
This methos is to brodcast a message to every clients. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
Game[] games
private int gameId
private int playerId
private java.util.ArrayList clientOutputStreams
Constructor Detail |
---|
public Cards304Server()
Method Detail |
---|
public int getGameId()
public int getPlayerId()
public void go()
public void tellEveryone(java.lang.String message)
message
- String message to be sent to every clients.public static void main(java.lang.String[] args)
public void takeAction(java.lang.String srvMsg)
srvMsg
- String server message.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |