|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MessageParser<T>
An interface that is used to parse messages of different formats
into ActionPair
objects, and vice versa. The format
of the messages should be well defined before this interface is
implemented, to simplify the process of implementing the methods.
Method Summary | |
---|---|
T |
createMessage(Action action,
java.lang.Object[][] values,
AbstractPlayer sender)
Creates a message in the specified format from an Action identifier, an array of values, and a sender. |
ActionPair |
parseMessage(T message)
Takes a message in the specified format as input parameter, and creates an ActionPair object based on the contents
of the message. |
Method Detail |
---|
ActionPair parseMessage(T message)
ActionPair
object based on the contents
of the message.
message
- The message to parse.
ActionPair
object wrapping the message's contents.T createMessage(Action action, java.lang.Object[][] values, AbstractPlayer sender)
action
- The action identifier of the message.values
- The values to contain in the message.sender
- The sender of the action message.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |