|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MessageParser
An interface that is used to parse messages of different formats
into ActionTriplet
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 | |
---|---|
java.lang.Object |
createMessage(Action action,
java.lang.Object[][] values)
Creates a message in the specified format from an Action identifier and an array of values. |
ActionTriplet |
parseMessage(java.lang.Object message)
Takes a message in the specified format as input parameter, and creates an ActionTriplet object based on the contents
of the message. |
Method Detail |
---|
ActionTriplet parseMessage(java.lang.Object message) throws java.io.IOException
ActionTriplet
object based on the contents
of the message. If the format of the message is not as expected, an
IOException
should be thrown.
message
- The message to parse.
ActionTriplet
object wrapping the message's contents.
java.io.IOException
- If the provided message is not in the expected format, or of the correct type.java.lang.Object createMessage(Action action, java.lang.Object[][] values)
action
- The action identifier of the message.values
- The values to contain in the message.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |