public abstract class ImmutableSctpMessageInfo
extends com.sun.nio.sctp.MessageInfo
com.sun.nio.sctp.MessageInfo.| Modifier and Type | Method and Description |
|---|---|
static ImmutableSctpMessageInfo |
create(com.sun.nio.sctp.Association association,
int streamNumber)
Creates an immutable
MessageInfo with specified association, stream
number, and the peer primary address as the preferred peer address of the
association to send the message to. |
static ImmutableSctpMessageInfo |
create(com.sun.nio.sctp.Association association,
int streamNumber,
int payloadProtocolID)
Creates an immutable
MessageInfo with specified association, stream
number, payload protocol identifier and the peer primary address as the
preferred peer address of the association to send the message to. |
static ImmutableSctpMessageInfo |
create(com.sun.nio.sctp.Association association,
int streamNumber,
int payloadProtocolID,
boolean unordered)
Creates an immutable
MessageInfo with specified association, stream
number, payload protocol identifier, unordered flag and the peer primary
address as the preferred peer address of the association to send the message
to. |
static ImmutableSctpMessageInfo |
create(com.sun.nio.sctp.Association association,
SocketAddress address,
int streamNumber)
Creates an immutable
MessageInfo with specified association, stream
number and the preferred peer address of the association to send the message
to. |
static ImmutableSctpMessageInfo |
create(com.sun.nio.sctp.Association association,
SocketAddress address,
int streamNumber,
int payloadProtocolID)
Creates an immutable
MessageInfo with specified association, stream
number, payload protocol identifier and the preferred peer address of the
association to send the message to. |
static ImmutableSctpMessageInfo |
create(com.sun.nio.sctp.Association association,
SocketAddress address,
int streamNumber,
int payloadProtocolID,
boolean unordered)
Creates an immutable
MessageInfo with specified association, stream
number, payload protocol identifier, unordered flag and the preferred peer
address of the association to send the message to. |
static ImmutableSctpMessageInfo |
create(int streamNumber)
Creates an immutable
MessageInfo with specified stream number and
the peer primary address as the preferred peer address. |
static ImmutableSctpMessageInfo |
create(int streamNumber,
int payloadProtocolID)
Creates an immutable
MessageInfo with specified stream number,
payload protocol identifier and the peer primary address as the
preferred peer address. |
static ImmutableSctpMessageInfo |
create(int streamNumber,
int payloadProtocolID,
boolean unordered)
Creates an immutable
MessageInfo with specified stream number,
payload protocol identifier, unordered flag and the peer primary address as
the preferred peer address. |
static ImmutableSctpMessageInfo |
create(com.sun.nio.sctp.MessageInfo msgInfo)
Creates an immutable
MessageInfo that is cloned from the specified
MessageInfo instance. |
static ImmutableSctpMessageInfo |
create(SocketAddress address,
int streamNumber)
Creates an immutable
MessageInfo with specified stream number and
the preferred peer address. |
static ImmutableSctpMessageInfo |
create(SocketAddress address,
int streamNumber,
int payloadProtocolID)
Creates an immutable
MessageInfo with specified stream number,
payload protocol identifier and the preferred peer address. |
static ImmutableSctpMessageInfo |
create(SocketAddress address,
int streamNumber,
int payloadProtocolID,
boolean unordered)
Creates an immutable
MessageInfo with specified stream number,
payload protocol identifier, unordered flag and the preferred peer address. |
static ImmutableSctpMessageInfo |
wrap(com.sun.nio.sctp.MessageInfo msgInfo)
Wraps the specified
MessageInfo instance. |
public static ImmutableSctpMessageInfo create(int streamNumber)
MessageInfo with specified stream number and
the peer primary address as the preferred peer address.
The returned instance will have its unordered flag set to
false, its timeToLive value set to 0, its complete
value set to true, and its payloadProtocolID value set to 0.
streamNumber - the stream number that the message will be sent onMessageInfopublic static ImmutableSctpMessageInfo create(SocketAddress address, int streamNumber)
MessageInfo with specified stream number and
the preferred peer address.
The returned instance will have its unordered flag set to
false, its timeToLive value set to 0, its complete
value set to true, and its payloadProtocolID value set to 0.
address - the preferred peer address of the association to send the
message to, or null to use the peer primary addressstreamNumber - the stream number that the message will be sent onMessageInfopublic static ImmutableSctpMessageInfo create(com.sun.nio.sctp.Association association, int streamNumber)
MessageInfo with specified association, stream
number, and the peer primary address as the preferred peer address of the
association to send the message to.
The returned instance will have its unordered flag set to
false, its timeToLive value set to 0, its complete
value set to true, and its payloadProtocolID value set to 0.
association - the association to send the message onstreamNumber - the stream number that the message will be sent onMessageInfopublic static ImmutableSctpMessageInfo create(com.sun.nio.sctp.Association association, SocketAddress address, int streamNumber)
MessageInfo with specified association, stream
number and the preferred peer address of the association to send the message
to.
The returned instance will have its unordered flag set to
false, its timeToLive value set to 0, its complete
value set to true, and its payloadProtocolID value set to 0.
association - the association to send the message onaddress - the preferred peer address of the association to send the
message to, or null to use the peer primary addressstreamNumber - the stream number that the message will be sent onMessageInfopublic static ImmutableSctpMessageInfo create(int streamNumber, int payloadProtocolID)
MessageInfo with specified stream number,
payload protocol identifier and the peer primary address as the
preferred peer address.
The returned instance will have its unordered flag set to
false, its timeToLive value set to 0, and its
complete value set to true.
streamNumber - the stream number that the message will be sent onpayloadProtocolID - The payload protocol identifier.MessageInfopublic static ImmutableSctpMessageInfo create(SocketAddress address, int streamNumber, int payloadProtocolID)
MessageInfo with specified stream number,
payload protocol identifier and the preferred peer address.
The returned instance will have its unordered flag set to
false, its timeToLive value set to 0, and its
complete value set to true.
address - the preferred peer address of the association to
send the message to, or null to use the peer primary
addressstreamNumber - the stream number that the message will be sent onpayloadProtocolID - The payload protocol identifier.MessageInfopublic static ImmutableSctpMessageInfo create(com.sun.nio.sctp.Association association, int streamNumber, int payloadProtocolID)
MessageInfo with specified association, stream
number, payload protocol identifier and the peer primary address as the
preferred peer address of the association to send the message to.
The returned instance will have its unordered flag set to
false, its timeToLive value set to 0, and its
complete value set to true.
association - the association to send the message onstreamNumber - the stream number that the message will be sent onpayloadProtocolID - The payload protocol identifier.MessageInfopublic static ImmutableSctpMessageInfo create(com.sun.nio.sctp.Association association, SocketAddress address, int streamNumber, int payloadProtocolID)
MessageInfo with specified association, stream
number, payload protocol identifier and the preferred peer address of the
association to send the message to.
The returned instance will have its unordered flag set to
false, its timeToLive value set to 0, and its
complete value set to true.
association - the association to send the message onaddress - the preferred peer address of the association to
send the message to, or null to use the peer primary
addressstreamNumber - the stream number that the message will be sent onpayloadProtocolID - The payload protocol identifier.MessageInfopublic static ImmutableSctpMessageInfo create(int streamNumber, int payloadProtocolID, boolean unordered)
MessageInfo with specified stream number,
payload protocol identifier, unordered flag and the peer primary address as
the preferred peer address.
The returned instance will have its timeToLive value set to 0, and
its complete value set to true.
streamNumber - the stream number that the message will be sent onpayloadProtocolID - The payload protocol identifier.unordered - true requests the un-ordered delivery of the
message, false indicates that the message is
ordered.MessageInfopublic static ImmutableSctpMessageInfo create(SocketAddress address, int streamNumber, int payloadProtocolID, boolean unordered)
MessageInfo with specified stream number,
payload protocol identifier, unordered flag and the preferred peer address.
The returned instance will have its timeToLive value set to 0, and
its complete value set to true.
address - the preferred peer address of the association to
send the message to, or null to use the peer primary
addressstreamNumber - the stream number that the message will be sent onpayloadProtocolID - The payload protocol identifier.unordered - true requests the un-ordered delivery of the
message, false indicates that the message is
ordered.MessageInfopublic static ImmutableSctpMessageInfo create(com.sun.nio.sctp.Association association, int streamNumber, int payloadProtocolID, boolean unordered)
MessageInfo with specified association, stream
number, payload protocol identifier, unordered flag and the peer primary
address as the preferred peer address of the association to send the message
to.
The returned instance will have its timeToLive value set to 0, and
its complete value set to true.
association - the association to send the message onstreamNumber - the stream number that the message will be sent onpayloadProtocolID - The payload protocol identifier.unordered - true requests the un-ordered delivery of the
message, false indicates that the message is
ordered.MessageInfopublic static ImmutableSctpMessageInfo create(com.sun.nio.sctp.Association association, SocketAddress address, int streamNumber, int payloadProtocolID, boolean unordered)
MessageInfo with specified association, stream
number, payload protocol identifier, unordered flag and the preferred peer
address of the association to send the message to.
The returned instance will have its timeToLive value set to 0, and
its complete value set to true.
association - the association to send the message onaddress - the preferred peer address of the association to
send the message to, or null to use the peer primary
addressstreamNumber - the stream number that the message will be sent onpayloadProtocolID - The payload protocol identifier.unordered - true requests the un-ordered delivery of the
message, false indicates that the message is
ordered.MessageInfopublic static ImmutableSctpMessageInfo create(com.sun.nio.sctp.MessageInfo msgInfo)
MessageInfo that is cloned from the specified
MessageInfo instance.msgInfo - the instance from which the immutable MessageInfo
should be clonedMessageInfopublic static ImmutableSctpMessageInfo wrap(com.sun.nio.sctp.MessageInfo msgInfo)
MessageInfo instance.
Caution: The return instance is not immutable and have to be handled
carefully after passing it to ISctpSession's write methods. The internal state of the wrapped instance
should not be change as it may affect the result of the write
methods.
msgInfo - the MessageInfo instance to be wrappedMessageInfoCopyright © 2017–2022 SNF4J.ORG. All rights reserved.