com.millistream.www
Class MessageHeader

java.lang.Object
  extended by com.millistream.www.MessageHeader

public class MessageHeader
extends java.lang.Object

This class represents the header of a message received from the server.

See Also:
M, MC

Constructor Summary
MessageHeader(int mref, int mclass, long insref)
          Constructs a new MessageHeader object.
MessageHeader(int mref, int mclass, long insref, java.util.ArrayList<MessageField> fields)
          Constructs a new MessageHeader object with all the fields.
 
Method Summary
 java.util.ArrayList<MessageField> getFields()
          Returns an ArrayList of the fields.
 long getInsref()
          Returns the Instrument Reference (insref)
 int getMclass()
          Returns the Message Class
 int getMref()
          Returns the Message Reference
 java.lang.String toString()
          Constructs and returns a (debug) String of the Mref, Mclass and Insref
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MessageHeader

public MessageHeader(int mref,
                     int mclass,
                     long insref)
Constructs a new MessageHeader object.

Parameters:
mref - message reference
mclass - message class
insref - instrument reference

MessageHeader

public MessageHeader(int mref,
                     int mclass,
                     long insref,
                     java.util.ArrayList<MessageField> fields)
Constructs a new MessageHeader object with all the fields.

Parameters:
mref - message reference
mclass - message class
insref - instrument reference
fields - an ArrayList of the fields
Method Detail

getMref

public int getMref()
Returns the Message Reference

Returns:
the mref

getMclass

public int getMclass()
Returns the Message Class

Returns:
the mclass

getInsref

public long getInsref()
Returns the Instrument Reference (insref)

Returns:
the insref

getFields

public java.util.ArrayList<MessageField> getFields()
Returns an ArrayList of the fields. Only works if the MessageHeader was returned by a call to the getMessagesAndFields() method.

Returns:
a ArrayList object with all the fields for this message

toString

public java.lang.String toString()
Constructs and returns a (debug) String of the Mref, Mclass and Insref

Overrides:
toString in class java.lang.Object