|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcommon.NetworkObject
public class NetworkObject
| Field Summary | |
|---|---|
static int |
ALREADY_LOGGED_IN
Used to notify that a user using that username is already logged in. |
static int |
CARD
|
static int |
CREATE_NEW_USER
Used to notify that the player wants to create a new player profile. |
static int |
DISCONNECTED
|
static int |
DRAW
|
static int |
GAME_CHOICE
Indicates that the accompanying message contains the name of the game the player wants to play. |
static int |
GAME_PACKET
Used to indicate the the accompanying object contains information about the game currently being played. |
static int |
GAME_RESULT
Used to notify the player that the accompanying message contains the result of the game defined in Player. |
static int |
GET_RECORDS
Used to notify that that the player wants to know the other's players records. |
static int |
LEAVE_TABLE
Used to notify the Server that the player wants to leave the table. |
static int |
LOGIN
Used to notify the server that a client is logging in. |
static int |
LOSS
|
static int |
NO_SUCH_GAME
Should never be used unless a Player somehow selects to play a game that doesn't exist on the Server. |
static int |
NO_SUCH_PLAYER
Used to notify the server a player is disconnected. |
static int |
OPPONENT_CARD
|
static int |
OPPONENT_MOVE
|
static int |
PLAY_AGAIN
|
static int |
PLAYER_DISCONNECTED
Used to notify a player that their opponent disconnected. |
static int |
PLAYER_INFO
Used to nottify the player that the accompanying message is a String representation of one of their opponents. |
static int |
USER_ALREADY_EXISTS
Used to notify the player that the username he tried to create already exists in the database. |
static int |
WIN
|
static int |
WRONG_PASSWORD
Used to notify the player that the password provided doesn't match the password in the database. |
| Constructor Summary | |
|---|---|
NetworkObject(int type,
java.lang.Object message)
Creates a new instance of NetworkObject |
|
| Method Summary | |
|---|---|
java.lang.Object |
getMessage()
Returns the Object sent in the message. |
int |
getType()
Returns an int representing the protocol for the type of message. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int LOGIN
public static final int ALREADY_LOGGED_IN
public static final int CREATE_NEW_USER
public static final int NO_SUCH_PLAYER
public static final int WRONG_PASSWORD
public static final int USER_ALREADY_EXISTS
public static final int PLAYER_DISCONNECTED
public static final int PLAYER_INFO
public static final int GAME_RESULT
public static final int LEAVE_TABLE
public static final int GET_RECORDS
public static final int OPPONENT_MOVE
public static final int DRAW
public static final int WIN
public static final int LOSS
public static final int OPPONENT_CARD
public static final int CARD
public static final int DISCONNECTED
public static final int PLAY_AGAIN
public static final int GAME_CHOICE
public static final int NO_SUCH_GAME
public static final int GAME_PACKET
| Constructor Detail |
|---|
public NetworkObject(int type,
java.lang.Object message)
type - int of the message.message - Object that is being encapsulated in the NetworkObject.| Method Detail |
|---|
public int getType()
public java.lang.Object getMessage()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||