31 * messages.
32 *
33 * <P> Received SCTP messages, returned by
34 * {@link SctpChannel#receive SctpChannel.receive} and {@link
35 * SctpMultiChannel#receive SctpMultiChannel.receive},
36 * return a {@code MessageInfo} instance that can be queried to determine
37 * ancillary information about the received message. Messages being sent should
38 * use one of the {@link #createOutgoing(java.net.SocketAddress,int)
39 * createOutgoing} methods to provide ancillary data for the message being
40 * sent, and may use the appropriate setter methods to override the default
41 * values provided for {@link #isUnordered() unordered}, {@link #timeToLive()
42 * timeToLive}, {@link #isComplete() complete} and {@link #payloadProtocolID()
43 * payloadProtocolID}, before sending the message.
44 *
45 * <P> For out going messages the {@code timeToLive} parameter is a time period
46 * that the sending side SCTP stack may expire the message if it has not been
47 * sent. This time period is an indication to the stack that the message is no
48 * longer required to be sent after the time period expires. It is not a hard
49 * timeout and may be influenced by whether the association supports the partial
50 * reliability extension, <a href=http://www.ietf.org/rfc/rfc3758.txt>RFC 3758
51 * <a>
52 *
53 * <P> {@code MessageInfo} instances are not safe for use by multiple concurrent
54 * threads. If a MessageInfo is to be used by more than one thread then access
55 * to the MessageInfo should be controlled by appropriate synchronization.
56 *
57 * @since 1.7
58 */
59 public abstract class MessageInfo {
60 /**
61 * Initializes a new instance of this class.
62 */
63 protected MessageInfo() {}
64
65 /**
66 * Creates a {@code MessageInfo} instance suitable for use when
67 * sending a message.
68 *
69 * <P> The returned instance will have its {@link #isUnordered() unordered}
70 * value set to {@code false}, its {@link #timeToLive() timeToLive} value
71 * set to {@code 0}, its {@link #isComplete() complete} value set
72 * to {@code true}, and its {@link #payloadProtocolID() payloadProtocolID}
73 * value set to {@code 0}. These values, if required, can be set through
74 * the appropriate setter method before sending the message.
75 *
76 * @param address
77 * For a connected {@code SctpChannel} the address is the
78 * preferred peer address of the association to send the message
|
31 * messages.
32 *
33 * <P> Received SCTP messages, returned by
34 * {@link SctpChannel#receive SctpChannel.receive} and {@link
35 * SctpMultiChannel#receive SctpMultiChannel.receive},
36 * return a {@code MessageInfo} instance that can be queried to determine
37 * ancillary information about the received message. Messages being sent should
38 * use one of the {@link #createOutgoing(java.net.SocketAddress,int)
39 * createOutgoing} methods to provide ancillary data for the message being
40 * sent, and may use the appropriate setter methods to override the default
41 * values provided for {@link #isUnordered() unordered}, {@link #timeToLive()
42 * timeToLive}, {@link #isComplete() complete} and {@link #payloadProtocolID()
43 * payloadProtocolID}, before sending the message.
44 *
45 * <P> For out going messages the {@code timeToLive} parameter is a time period
46 * that the sending side SCTP stack may expire the message if it has not been
47 * sent. This time period is an indication to the stack that the message is no
48 * longer required to be sent after the time period expires. It is not a hard
49 * timeout and may be influenced by whether the association supports the partial
50 * reliability extension, <a href=http://www.ietf.org/rfc/rfc3758.txt>RFC 3758
51 * </a>
52 *
53 * <P> {@code MessageInfo} instances are not safe for use by multiple concurrent
54 * threads. If a MessageInfo is to be used by more than one thread then access
55 * to the MessageInfo should be controlled by appropriate synchronization.
56 *
57 * @since 1.7
58 */
59 @jdk.Supported
60 public abstract class MessageInfo {
61 /**
62 * Initializes a new instance of this class.
63 */
64 protected MessageInfo() {}
65
66 /**
67 * Creates a {@code MessageInfo} instance suitable for use when
68 * sending a message.
69 *
70 * <P> The returned instance will have its {@link #isUnordered() unordered}
71 * value set to {@code false}, its {@link #timeToLive() timeToLive} value
72 * set to {@code 0}, its {@link #isComplete() complete} value set
73 * to {@code true}, and its {@link #payloadProtocolID() payloadProtocolID}
74 * value set to {@code 0}. These values, if required, can be set through
75 * the appropriate setter method before sending the message.
76 *
77 * @param address
78 * For a connected {@code SctpChannel} the address is the
79 * preferred peer address of the association to send the message
|