pictionary.message
Enum Message.MessageType

java.lang.Object
  extended by java.lang.Enum<Message.MessageType>
      extended by pictionary.message.Message.MessageType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Message.MessageType>
Enclosing class:
Message

public static enum Message.MessageType
extends java.lang.Enum<Message.MessageType>

Used in Message to determine the type of message.


Enum Constant Summary
AClientConnectedToServer
          Sent to a client to inform it that a client connected to the server.
AClientCorrectGuess
          Sent to clients to inform them that someone made a correct guess.
AClientDisconnected
          Sent to a client to inform it that a client disconnected.
AClientIncorrectGuess
          Sent to clients to inform them that someone made a faulty guess.
AClientJoinedGame
          Send to a client to inform it that a new player joined the game.
AClientStartedDrawing
          Sent to a client to inform it that a client started drawing.
AClientStoppedDrawing
          The specified client stopped drawing.
ClientMessageBroadcast
          A message broadcast from the specified client.
ClientUsernameResponse
          Sent as a response to ServerRequestUsername.
CorrectGuess
          Informs a client that he made a correct guess.
DisconnectRequest
          Sent from a client when it wants to disconnect from the server.
DrawData
          This message contains draw data.
Guess
          Sent from a client when it makes a guess.
JoinGameMessage
          Sent to the client when it joins a new game.
JoinGameRequest
          Sent from a client to tell the server that it wants to join a game of Pictionary.
ServerAcceptedConnection
          Informs the client that the server has accepted the connection.
ServerDisconnecting
          Indicates that the server is closing.
ServerMessage
          A message from the server.
ServerRequestUsername
          Informs the client that is should send a message containing an username.
StartDrawing
          Tells a client to start drawing.
StartGuessing
          Tells a client it can start guessing.
StopDrawing
          Tells a client to stop drawing.
StopGuessing
          Tells a client to stop guessing.
 
Method Summary
static Message.MessageType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Message.MessageType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ServerDisconnecting

public static final Message.MessageType ServerDisconnecting
Indicates that the server is closing.


ServerMessage

public static final Message.MessageType ServerMessage
A message from the server.


ClientMessageBroadcast

public static final Message.MessageType ClientMessageBroadcast
A message broadcast from the specified client.


StartGuessing

public static final Message.MessageType StartGuessing
Tells a client it can start guessing.


AClientStoppedDrawing

public static final Message.MessageType AClientStoppedDrawing
The specified client stopped drawing.


StartDrawing

public static final Message.MessageType StartDrawing
Tells a client to start drawing.


StopDrawing

public static final Message.MessageType StopDrawing
Tells a client to stop drawing.


StopGuessing

public static final Message.MessageType StopGuessing
Tells a client to stop guessing.


CorrectGuess

public static final Message.MessageType CorrectGuess
Informs a client that he made a correct guess.


JoinGameRequest

public static final Message.MessageType JoinGameRequest
Sent from a client to tell the server that it wants to join a game of Pictionary.


ServerRequestUsername

public static final Message.MessageType ServerRequestUsername
Informs the client that is should send a message containing an username.


ServerAcceptedConnection

public static final Message.MessageType ServerAcceptedConnection
Informs the client that the server has accepted the connection.


ClientUsernameResponse

public static final Message.MessageType ClientUsernameResponse
Sent as a response to ServerRequestUsername.


AClientCorrectGuess

public static final Message.MessageType AClientCorrectGuess
Sent to clients to inform them that someone made a correct guess.


AClientIncorrectGuess

public static final Message.MessageType AClientIncorrectGuess
Sent to clients to inform them that someone made a faulty guess.


DrawData

public static final Message.MessageType DrawData
This message contains draw data.


DisconnectRequest

public static final Message.MessageType DisconnectRequest
Sent from a client when it wants to disconnect from the server.


AClientDisconnected

public static final Message.MessageType AClientDisconnected
Sent to a client to inform it that a client disconnected.


AClientStartedDrawing

public static final Message.MessageType AClientStartedDrawing
Sent to a client to inform it that a client started drawing.


AClientConnectedToServer

public static final Message.MessageType AClientConnectedToServer
Sent to a client to inform it that a client connected to the server.


AClientJoinedGame

public static final Message.MessageType AClientJoinedGame
Send to a client to inform it that a new player joined the game.


JoinGameMessage

public static final Message.MessageType JoinGameMessage
Sent to the client when it joins a new game.


Guess

public static final Message.MessageType Guess
Sent from a client when it makes a guess.

Method Detail

values

public static Message.MessageType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Message.MessageType c : Message.MessageType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Message.MessageType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null