Listener
Class XMLMessageListener
java.lang.Object
Listener.Listener
Listener.XMLMessageListener
- All Implemented Interfaces:
- IMessageParse, IMetaOperations, IParseOperations
public class XMLMessageListener
- extends Listener
- implements IMessageParse, IParseOperations, IMetaOperations
Each MessageParser object takes messages for a specified communication
protocol and translates them to a data description object describing
the message in terms of the message name, and a set of fields where
the fields contains the message's values.
- Version:
- Connect 0.1
- Author:
- Paul Grace, Lancaster University
Method Summary |
java.lang.Object |
decode(java.lang.String name,
java.lang.Object data)
|
AbstractMessage |
MessageParse(byte[] MessagePacket)
Takes a Message packet which is a byte array and transfers it into a
object that describes each message in terms of its name/type and the
message fields with their value. |
AbstractMessage |
MessageParse(byte[] MessagePacket,
java.util.ArrayList<java.lang.String> Extension)
Takes a Message packet which is a byte array and transfers it into a
object that describes each message in terms of its name/type and the
message fields with their value. |
Methods inherited from class Listener.Listener |
addFunction, addParseOperation, composeTypedValue, getConstantValue, getFunctionResult, getFunctionResult, getTextTypedValue, getTypedValue, inspectFunctions, inspectParseOperations, removeFunction, removeParseOperation, toByteArray |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLMessageListener
public XMLMessageListener(java.lang.String File)
MessageParse
public AbstractMessage MessageParse(byte[] MessagePacket)
- Takes a Message packet which is a byte array and transfers it into a
object that describes each message in terms of its name/type and the
message fields with their value.
- Specified by:
MessageParse
in interface IMessageParse
- Parameters:
MessagePacket
- The message packet in bytes
- Returns:
- A AbstractMessage identified by a Message Type with fields and values
describing each instance of the message.
decode
public java.lang.Object decode(java.lang.String name,
java.lang.Object data)
- Specified by:
decode
in interface IParseOperations
- Overrides:
decode
in class Listener
MessageParse
public AbstractMessage MessageParse(byte[] MessagePacket,
java.util.ArrayList<java.lang.String> Extension)
- Description copied from interface:
IMessageParse
- Takes a Message packet which is a byte array and transfers it into a
object that describes each message in terms of its name/type and the
message fields with their value. Uses a dynamic parser extension
- Specified by:
MessageParse
in interface IMessageParse
- Parameters:
MessagePacket
- The message packet in bytesExtension
- The set of strings that add information to the parser
- Returns:
- A AbstractMessage identified by a Message Type with fields and values
describing each instance of the message.