Package com.millistream.www
Class MessageHeader
java.lang.Object
com.millistream.www.MessageHeader
This class represents the header of a message received from the server.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMessageHeader(short mref, long mclass, long insref, short delay) Constructs a newMessageHeaderobject.MessageHeader(short mref, long mclass, long insref, short delay, ArrayList<MessageField> fields) Constructs a newMessageHeaderobject with all the fields. -
Method Summary
Modifier and TypeMethodDescriptionshortgetDelay()Returns the intended delay of the message, will only contain 0 unless the connection is set to delay-mode usingsetHandleDelayReturns an ArrayList of the fields.longReturns the Instrument Reference (insref)longReturns the Message ClassshortgetMref()Returns the Message ReferencetoString()Constructs and returns a (debug) String of the Mref, Mclass and Insref
-
Constructor Details
-
MessageHeader
public MessageHeader(short mref, long mclass, long insref, short delay) Constructs a newMessageHeaderobject.- Parameters:
mref- message referencemclass- message classinsref- instrument reference
-
MessageHeader
public MessageHeader(short mref, long mclass, long insref, short delay, ArrayList<MessageField> fields) Constructs a newMessageHeaderobject with all the fields.- Parameters:
mref- message referencemclass- message classinsref- instrument referencefields- 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 usingsetHandleDelay- Returns:
- the intended delay of the message
-
getInsref
public long getInsref()Returns the Instrument Reference (insref)- Returns:
- the insref
-
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
Constructs and returns a (debug) String of the Mref, Mclass and Insref
-