APIdia Launch Partner
Top Description Fields Constructors Methods
sun.nio.ch.sctp

public Class MessageInfoImpl

extends MessageInfo
Class Inheritance
Imports
java.net.SocketAddress, com.sun.nio.sctp.MessageInfo, .Association

An implementation of a MessageInfo.

Field Summary

Modifier and TypeField and Description
private final SocketAddress
private Association
private int
private final int
private boolean
private int
private int
private long
private boolean

Constructor Summary

AccessConstructor and Description
public
MessageInfoImpl(Association association, SocketAddress address, int streamNumber)

private
MessageInfoImpl(int assocId, SocketAddress address, int bytes, int streamNumber, boolean complete, boolean unordered, int ppid)

Method Summary

Modifier and TypeMethod and Description
public SocketAddress
address()

Implements abstract com.sun.nio.sctp.MessageInfo.address.

Returns the source socket address if the message has been received, otherwise the preferred destination of the message to be sent.

public Association
association()

Implements abstract com.sun.nio.sctp.MessageInfo.association.

Returns the association that the message was received on, if the message has been received, otherwise the association that the message is to be sent on.

pack-priv int
public int
bytes()

Implements abstract com.sun.nio.sctp.MessageInfo.bytes.

Returns the number of bytes read for the received message.

public MessageInfo
complete(boolean complete)

Implements abstract com.sun.nio.sctp.MessageInfo.complete.

Sets whether or not the message is complete.

public boolean
isComplete()

Implements abstract com.sun.nio.sctp.MessageInfo.isComplete.

Tells whether or not the message is complete.

public boolean
isUnordered()

Implements abstract com.sun.nio.sctp.MessageInfo.isUnordered.

Tells whether or not the message is unordered.

public int
payloadProtocolID()

Implements abstract com.sun.nio.sctp.MessageInfo.payloadProtocolID.

Returns the payload protocol Identifier.

public MessageInfo
payloadProtocolID(int ppid)

Implements abstract com.sun.nio.sctp.MessageInfo.payloadProtocolID.

Sets the payload protocol Identifier.

pack-priv void
setAssociation(Association association)

MessageInfoImpl instances created from native will need to have their association set from the channel.

public int
streamNumber()

Implements abstract com.sun.nio.sctp.MessageInfo.streamNumber.

Returns the stream number that the message was received on, if the message has been received, otherwise the stream number that the message is to be sent on.

public MessageInfo
streamNumber(int streamNumber)

Implements abstract com.sun.nio.sctp.MessageInfo.streamNumber.

Sets the stream number that the message is to be sent on.

public long
timeToLive()

Implements abstract com.sun.nio.sctp.MessageInfo.timeToLive.

The time period that the sending side may expire the message if it has not been sent, or 0 to indicate that no timeout should occur.

public MessageInfo
timeToLive(long millis)

Implements abstract com.sun.nio.sctp.MessageInfo.timeToLive.

Sets the time period that the sending side may expire the message if it has not been sent.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public MessageInfo
unordered(boolean unordered)

Implements abstract com.sun.nio.sctp.MessageInfo.unordered.

Sets whether or not the message is unordered.

Inherited from com.sun.nio.sctp.MessageInfo:
createOutgoingcreateOutgoing

Field Detail

addressback to summary
private final SocketAddress address
associationback to summary
private Association association
assocIdback to summary
private int assocId
bytesback to summary
private final int bytes
completeback to summary
private boolean complete
ppidback to summary
private int ppid
streamNumberback to summary
private int streamNumber
timeToLiveback to summary
private long timeToLive
unorderedback to summary
private boolean unordered

Constructor Detail

MessageInfoImplback to summary
public MessageInfoImpl(Association association, SocketAddress address, int streamNumber)
MessageInfoImplback to summary
private MessageInfoImpl(int assocId, SocketAddress address, int bytes, int streamNumber, boolean complete, boolean unordered, int ppid)

Method Detail

addressback to summary
public SocketAddress address()

Implements abstract com.sun.nio.sctp.MessageInfo.address.

Doc from com.sun.nio.sctp.MessageInfo.address.

Returns the source socket address if the message has been received, otherwise the preferred destination of the message to be sent.

Annotations
@Override
associationback to summary
public Association association()

Implements abstract com.sun.nio.sctp.MessageInfo.association.

Doc from com.sun.nio.sctp.MessageInfo.association.

Returns the association that the message was received on, if the message has been received, otherwise the association that the message is to be sent on.

Annotations
@Override
associationIDback to summary
pack-priv int associationID()
bytesback to summary
public int bytes()

Implements abstract com.sun.nio.sctp.MessageInfo.bytes.

Doc from com.sun.nio.sctp.MessageInfo.bytes.

Returns the number of bytes read for the received message.

This method is only appicable for received messages, it has no meaning for messages being sent.

Annotations
@Override
completeback to summary
public MessageInfo complete(boolean complete)

Implements abstract com.sun.nio.sctp.MessageInfo.complete.

Doc from com.sun.nio.sctp.MessageInfo.complete.

Sets whether or not the message is complete.

For messages being sent true indicates that the message is complete, false indicates that the message is not complete. How the send channel interprets this value depends on the value of its SCTP_EXPLICIT_COMPLETE socket option.

Annotations
@Override
isCompleteback to summary
public boolean isComplete()

Implements abstract com.sun.nio.sctp.MessageInfo.isComplete.

Doc from com.sun.nio.sctp.MessageInfo.isComplete.

Tells whether or not the message is complete.

For received messages true indicates that the message was completely received. For messages being sent true indicates that the message is complete, false indicates that the message is not complete. How the send channel interprets this value depends on the value of its SCTP_EXPLICIT_COMPLETE socket option.

Annotations
@Override
isUnorderedback to summary
public boolean isUnordered()

Implements abstract com.sun.nio.sctp.MessageInfo.isUnordered.

Doc from com.sun.nio.sctp.MessageInfo.isUnordered.

Tells whether or not the message is unordered. For received messages true indicates that the message was sent non-ordered. For messages being sent true requests the un-ordered delivery of the message, false indicates that the message is ordered.

Annotations
@Override
payloadProtocolIDback to summary
public int payloadProtocolID()

Implements abstract com.sun.nio.sctp.MessageInfo.payloadProtocolID.

Doc from com.sun.nio.sctp.MessageInfo.payloadProtocolID.

Returns the payload protocol Identifier.

A value indicating the type of payload protocol data being transmitted/received. This value is passed as opaque data by SCTP. 0 indicates an unspecified payload protocol identifier.

Annotations
@Override
payloadProtocolIDback to summary
public MessageInfo payloadProtocolID(int ppid)

Implements abstract com.sun.nio.sctp.MessageInfo.payloadProtocolID.

Doc from com.sun.nio.sctp.MessageInfo.payloadProtocolID.

Sets the payload protocol Identifier.

A value indicating the type of payload protocol data being transmitted. This value is passed as opaque data by SCTP.

Annotations
@Override
setAssociationback to summary
pack-priv void setAssociation(Association association)

MessageInfoImpl instances created from native will need to have their association set from the channel.

streamNumberback to summary
public int streamNumber()

Implements abstract com.sun.nio.sctp.MessageInfo.streamNumber.

Doc from com.sun.nio.sctp.MessageInfo.streamNumber.

Returns the stream number that the message was received on, if the message has been received, otherwise the stream number that the message is to be sent on.

Annotations
@Override
streamNumberback to summary
public MessageInfo streamNumber(int streamNumber)

Implements abstract com.sun.nio.sctp.MessageInfo.streamNumber.

Doc from com.sun.nio.sctp.MessageInfo.streamNumber.

Sets the stream number that the message is to be sent on.

Annotations
@Override
timeToLiveback to summary
public long timeToLive()

Implements abstract com.sun.nio.sctp.MessageInfo.timeToLive.

Doc from com.sun.nio.sctp.MessageInfo.timeToLive.

The time period that the sending side may expire the message if it has not been sent, or 0 to indicate that no timeout should occur. This value is only applicable for messages being sent, it has no meaning for received messages.

Annotations
@Override
timeToLiveback to summary
public MessageInfo timeToLive(long millis)

Implements abstract com.sun.nio.sctp.MessageInfo.timeToLive.

Doc from com.sun.nio.sctp.MessageInfo.timeToLive.

Sets the time period that the sending side may expire the message if it has not been sent.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
unorderedback to summary
public MessageInfo unordered(boolean unordered)

Implements abstract com.sun.nio.sctp.MessageInfo.unordered.

Doc from com.sun.nio.sctp.MessageInfo.unordered.

Sets whether or not the message is unordered.

Annotations
@Override