Class MessageHeader

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

public class MessageHeader extends Object
This class represents the header of a message received from the server.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    MessageHeader(short mref, long mclass, long insref, short delay)
    Constructs a new MessageHeader object.
    MessageHeader(short mref, long mclass, long insref, short delay, ArrayList<MessageField> fields)
    Constructs a new MessageHeader object with all the fields.
  • Method Summary

    Modifier and Type
    Method
    Description
    short
    Returns the intended delay of the message, will only contain 0 unless the connection is set to delay-mode using setHandleDelay
    Returns an ArrayList of the fields.
    long
    Returns the Instrument Reference (insref)
    long
    Returns the Message Class
    short
    Returns the Message Reference
    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 Details

    • MessageHeader

      public MessageHeader(short mref, long mclass, long insref, short delay)
      Constructs a new MessageHeader object.
      Parameters:
      mref - message reference
      mclass - message class
      insref - instrument reference
    • MessageHeader

      public MessageHeader(short mref, long mclass, long insref, short delay, 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 Details

    • getMref

      public short getMref()
      Returns the Message Reference
      Returns:
      the mref
    • getMclass

      public long getMclass()
      Returns the Message Class
      Returns:
      the mclass
    • getDelay

      public short getDelay()
      Returns the intended delay of the message, will only contain 0 unless the connection is set to delay-mode using setHandleDelay
      Returns:
      the intended delay of the message
    • getInsref

      public long getInsref()
      Returns the Instrument Reference (insref)
      Returns:
      the insref
    • getFields

      public 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 String toString()
      Constructs and returns a (debug) String of the Mref, Mclass and Insref
      Overrides:
      toString in class Object