org.npsnet.xrti
Class HLAMessage

java.lang.Object
  extended byorg.npsnet.xrti.HLAMessage
All Implemented Interfaces:
java.lang.Comparable
Direct Known Subclasses:
HLAMessageDeleteObjectInstance, HLAMessageSendInteraction, HLAMessageUpdateAttributeValues

public abstract class HLAMessage
extends java.lang.Object
implements java.lang.Comparable

HLAMessage represents one message which can be received by time constrained federate. The message can be queued into the time stamp queue or into the receive order queue.

Author:
Stanislav Kozina
See Also:
TimeStampQueue, ReceiveOrderQueue

Field Summary
protected  LogicalTime logicalTime
          The logical time associated with the message.
protected static int MESSAGE_DELETE_OBJECT_INSTANCE
          Constant denoting that the message was created after invocation of service deleteObjectInstance().
protected static int MESSAGE_SEND_INTERACTION
          Constant denoting that the message was created after invocation of service sendInteraction().
protected static int MESSAGE_UPDATE_ATTRIBUTE_VALUES
          Constant denoting that the message was created after invocation of service updateAttributeValues().
private  int messageType
          The type of the message.
protected  OrderType sentOrdering
          The type of ordering with which the message was sent.
protected  TransportationType transportationType
          The type of transport associated with the message.
protected  byte[] userSuppliedTag
          The user-supplied tag associated with the message.
 
Constructor Summary
protected HLAMessage(int messageType)
          Constructor.
 
Method Summary
 int compareTo(java.lang.Object other)
          Compares this message to another (time stamps are compared).
 LogicalTime getLogicalTime()
          Returns logical time associated with the message.
 int getMessageType()
          Returns the type of the message.
 OrderType getSentOrdering()
          Returns the type of ordering with which the message was sent.
 TransportationType getTransportationType()
          Returns the type of transport associated with the message.
 byte[] getUserSuppliedTag()
          Returns the user-supplied tag associated with the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MESSAGE_SEND_INTERACTION

protected static final int MESSAGE_SEND_INTERACTION
Constant denoting that the message was created after invocation of service sendInteraction().

See Also:
Constant Field Values

MESSAGE_UPDATE_ATTRIBUTE_VALUES

protected static final int MESSAGE_UPDATE_ATTRIBUTE_VALUES
Constant denoting that the message was created after invocation of service updateAttributeValues().

See Also:
Constant Field Values

MESSAGE_DELETE_OBJECT_INSTANCE

protected static final int MESSAGE_DELETE_OBJECT_INSTANCE
Constant denoting that the message was created after invocation of service deleteObjectInstance().

See Also:
Constant Field Values

messageType

private int messageType
The type of the message.


userSuppliedTag

protected byte[] userSuppliedTag
The user-supplied tag associated with the message.


sentOrdering

protected OrderType sentOrdering
The type of ordering with which the message was sent.


logicalTime

protected LogicalTime logicalTime
The logical time associated with the message.


transportationType

protected TransportationType transportationType
The type of transport associated with the message.

Constructor Detail

HLAMessage

protected HLAMessage(int messageType)
Constructor.

Parameters:
messageType - the type of the message
Method Detail

getMessageType

public int getMessageType()
Returns the type of the message.

Returns:
the type of the message

getTransportationType

public TransportationType getTransportationType()
Returns the type of transport associated with the message.

Returns:
the type of transport associated with the message

getUserSuppliedTag

public byte[] getUserSuppliedTag()
Returns the user-supplied tag associated with the message.

Returns:
the user-supplied tag associated with the message

getSentOrdering

public OrderType getSentOrdering()
Returns the type of ordering with which the message was sent.

Returns:
the type of ordering with which the message was sent

getLogicalTime

public LogicalTime getLogicalTime()
Returns logical time associated with the message.

Returns:
logical time associated with the message

compareTo

public int compareTo(java.lang.Object other)
Compares this message to another (time stamps are compared).

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
other - message to compare this to
Returns:
+1 if time stamp of this message is greater than the other one, -1 if time stamp of this message is less than the other one 0 if the time stamps of messages are equal