Module jdk.sctp

Class MessageInfo

java.lang.Object
com.sun.nio.sctp.MessageInfo

public abstract class MessageInfo extends Object
The MessageInfo class provides additional ancillary information about messages.

Received SCTP messages, returned by SctpChannel.receive and SctpMultiChannel.receive, return a MessageInfo instance that can be queried to determine ancillary information about the received message. Messages being sent should use one of the createOutgoing methods to provide ancillary data for the message being sent, and may use the appropriate setter methods to override the default values provided for unordered, timeToLive, complete and payloadProtocolID, before sending the message.

For out going messages the timeToLive parameter is a time period that the sending side SCTP stack may expire the message if it has not been sent. This time period is an indication to the stack that the message is no longer required to be sent after the time period expires. It is not a hard timeout and may be influenced by whether the association supports the partial reliability extension, RFC 3758 .

MessageInfo instances are not safe for use by multiple concurrent threads. If a MessageInfo is to be used by more than one thread then access to the MessageInfo should be controlled by appropriate synchronization.

Since:
1.7