Listener
Class JavaObjectListener

java.lang.Object
  extended by Listener.Listener
      extended by Listener.JavaObjectListener
All Implemented Interfaces:
IMessageParse, IMetaOperations, IParseOperations

public class JavaObjectListener
extends Listener
implements IMessageParse, IParseOperations, IMetaOperations

Message Parser that parses messages where the message is composed of a Java Object.

Author:
Paul Grace, Lancaster University, UK

Field Summary
 
Fields inherited from class Listener.Listener
DSLContent, Parser, parsingOperations
 
Constructor Summary
JavaObjectListener(java.lang.Class File)
           
 
Method Summary
 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, decode, 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
 
Methods inherited from interface ParsingFramework.IParseOperations
composeTypedValue, decode, getConstantValue, getFunctionResult, getFunctionResult, getTextTypedValue, getTypedValue, toByteArray
 
Methods inherited from interface ParsingFramework.IMetaOperations
addFunction, addParseOperation, inspectFunctions, inspectParseOperations, removeFunction, removeParseOperation
 

Constructor Detail

JavaObjectListener

public JavaObjectListener(java.lang.Class File)
Method Detail

MessageParse

public AbstractMessage MessageParse(byte[] MessagePacket)
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.

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.

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 bytes
Extension - 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.