hypercast
Interface I_OverlayMessage

All Known Implementing Classes:
OL_Message

public interface I_OverlayMessage

This is the interface for application messages. It is implemented by the class OL_Message.


Field Summary
static short DELDUPS
           
static short E2EACK
           
static short H2HACK
           
static short INCAST
           
static short INORDER
           
static short NAMING
           
static short NOSERVICE
          Service identifiers for enhanced service messages.
static short SYNC
           
 
Method Summary
 short getHopLimit()
          Returns the maximum number of hops that this message may take in the network.
 byte[] getMessageID()
          Deprecated. use getMessageIdentifier
 byte[] getMessageIdentifier()
           
 byte[] getPayload()
          Returns the payload byte array carried by this message.
 int getPayloadLength()
          Returns the number of valid bytes in the payload.
 long getSequenceNumber()
          Returns the sequence number carried by this message.
 short getServiceIdentifier()
          Returns the service number carried by this message.
 short getServiceNumber()
          Deprecated. use getServiceIdentifier
 hypercast.I_LogicalAddress getSourceAddress()
           
 hypercast.I_LogicalAddress getSrcAddress()
          Deprecated. use getSourceAddress();
 byte[] getStreamID()
          Deprecated. use getStreamIdentifier
 int getStreamIdentifier()
          Returns the stream identifier carried by this message.
 byte getTrafficClass()
          Returns the traffic class of the message
 void setHopLimit(short hopLimit)
          Sets the hop limit for only this message.
 void setMsgIdentifier(int msgID)
          Sets the message identifier in this message if the message is an enhanced service message.
 void setSequenceNumber(long sequenceNum)
          Sets the sequence number in this message if the message is an stream-oriented message.
 void setServiceIdentifier(short serviceID)
          Sets the service number in this message if the message is an enhanced service message.
 void setStreamIdentifier(int streamID)
          Sets the stream identifier in this message if the message is an enhanced service message.
 void setTrafficClass(byte trafficclass)
          Sets the traffic class of the message.
 

Field Detail

NOSERVICE

public static final short NOSERVICE
Service identifiers for enhanced service messages.

See Also:
Constant Field Values

H2HACK

public static final short H2HACK
See Also:
Constant Field Values

E2EACK

public static final short E2EACK
See Also:
Constant Field Values

DELDUPS

public static final short DELDUPS
See Also:
Constant Field Values

SYNC

public static final short SYNC
See Also:
Constant Field Values

INCAST

public static final short INCAST
See Also:
Constant Field Values

INORDER

public static final short INORDER
See Also:
Constant Field Values

NAMING

public static final short NAMING
See Also:
Constant Field Values
Method Detail

getHopLimit

public short getHopLimit()
Returns the maximum number of hops that this message may take in the network. If called on a message that has been received from some other node this value is the original hop limit minus the number of hops that the message has already taken.


setHopLimit

public void setHopLimit(short hopLimit)
Sets the hop limit for only this message. The hop limit is the maximum number of hops this message will cross before being discarded. The default hop limit for all messages can be set by calling I_OverlaySocket.setHopLimit. 0 <= hop limit <= (2^16) - 1 The hopLimit is interpretted as an unsigned two byte quantity.


getPayload

public byte[] getPayload()
Returns the payload byte array carried by this message. Only getPayloadLength() bytes of the payload are valid.


getPayloadLength

public int getPayloadLength()
Returns the number of valid bytes in the payload.


getSrcAddress

public hypercast.I_LogicalAddress getSrcAddress()
Deprecated. use getSourceAddress();

Returns the logical address of the sender of this message.


getSourceAddress

public hypercast.I_LogicalAddress getSourceAddress()

getTrafficClass

public byte getTrafficClass()
Returns the traffic class of the message


setTrafficClass

public void setTrafficClass(byte trafficclass)
Sets the traffic class of the message.


getMessageID

public byte[] getMessageID()
Deprecated. use getMessageIdentifier

Returns the unique identifier of this message.


getServiceNumber

public short getServiceNumber()
Deprecated. use getServiceIdentifier

Returns the service number carried by this message.


getStreamID

public byte[] getStreamID()
Deprecated. use getStreamIdentifier

Gets the stream ID of the message. This method is useful only when messageStore is used for the transmission of application messages. If there is no stream id associated with this message, null is returned.


getServiceIdentifier

public short getServiceIdentifier()
Returns the service number carried by this message. It returns -1 if the message is not a enhanced service message.


setServiceIdentifier

public void setServiceIdentifier(short serviceID)
Sets the service number in this message if the message is an enhanced service message.


getStreamIdentifier

public int getStreamIdentifier()
Returns the stream identifier carried by this message. It returns -1 if the message is not a enhanced service message.


setStreamIdentifier

public void setStreamIdentifier(int streamID)
Sets the stream identifier in this message if the message is an enhanced service message.


getSequenceNumber

public long getSequenceNumber()
Returns the sequence number carried by this message. It returns -1 if the message is not a stream-oriented message.


setSequenceNumber

public void setSequenceNumber(long sequenceNum)
Sets the sequence number in this message if the message is an stream-oriented message.


getMessageIdentifier

public byte[] getMessageIdentifier()
Returns:
the message identifier carried by this message. It returns -1 if the message is not a enhanced service message.

setMsgIdentifier

public void setMsgIdentifier(int msgID)
Sets the message identifier in this message if the message is an enhanced service message.