public interface ISctpMultiSession extends ISctpSession
ISctpSession
interface to cover SCTP functionalities
related to the SCTP multi sessions.Modifier and Type | Method and Description |
---|---|
Set<com.sun.nio.sctp.Association> |
getAssociations()
Returns the open associations on the SCTP multi-channel's socket associated
with this session.
|
ISctpMultiSession |
getParent()
Gets the parent session.
|
Set<SocketAddress> |
getRemoteAddresses()
Returns all of the remote addresses to which the open associations on the
SCTP multi-channel associated with this session is connected.
|
Set<SocketAddress> |
getRemoteAddresses(com.sun.nio.sctp.Association association)
Returns all of the remote addresses to which the given association on the
SCTP multi-channel's socket associated with this session.
|
IFuture<Void> |
shutdown(com.sun.nio.sctp.Association association)
Shutdown an association without closing this session.
|
IFuture<Void> |
write(byte[] msg)
Writes a message from the specified byte array to the SCTP channel that is
associated with this session.
|
IFuture<Void> |
write(byte[] msg,
int offset,
int length)
Writes a message of given length from the specified byte array to the SCTP
channel that is associated with this session.
|
IFuture<Void> |
write(ByteBuffer msg)
Writes a message from the specified byte buffer to the SCTP channel that is
associated with this session.
|
IFuture<Void> |
write(ByteBuffer msg,
int length)
Writes a message of given length from the specified byte buffer to the SCTP
channel that is associated with this session.
|
IFuture<Void> |
write(Object msg)
Writes a message to the SCTP channel that is associated with this session.
|
void |
writenf(byte[] msg)
Writes a message from the specified byte array to the SCTP channel that is
associated with this session.
|
void |
writenf(byte[] msg,
int offset,
int length)
Writes a message of given length from the specified byte array to the SCTP
channel that is associated with this session.
|
void |
writenf(ByteBuffer msg)
Writes a message from the specified byte buffer to the SCTP channel that is
associated with this session.
|
void |
writenf(ByteBuffer msg,
int length)
Writes a message of given length from the specified byte buffer to the SCTP
channel that is associated with this session.
|
void |
writenf(Object msg)
Writes a message to the SCTP channel that is associated with this session.
|
bindAddress, getAssociation, getCodecPipeline, getHandler, getLocalAddress, getLocalAddresses, getRemoteAddress, unbindAddress, write, write, write, write, write, writenf, writenf, writenf, writenf, writenf
allocate, close, dirtyClose, execute, executenf, getAttributes, getCloseFuture, getCodecPipeline, getConfig, getCreateFuture, getCreationTime, getEndFuture, getId, getLastIoTime, getLastReadTime, getLastWriteTime, getName, getOpenFuture, getReadBytes, getReadBytesThroughput, getReadyFuture, getState, getTimer, getWrittenBytes, getWrittenBytesThroughput, isDataCopyingOptimized, isOpen, isReadSuspended, isWriteSuspended, quickClose, release, resumeRead, resumeWrite, suspendRead, suspendWrite
ISctpMultiSession getParent()
ISession
Some sessions may not implement its own I/O functionalities and use their parent's ones instead.
getParent
in interface ISctpSession
getParent
in interface ISession
null
if it does not exist.IFuture<Void> shutdown(com.sun.nio.sctp.Association association)
association
- the association to shutdownSet<com.sun.nio.sctp.Association> getAssociations()
Set
if there are noneSet<SocketAddress> getRemoteAddresses(com.sun.nio.sctp.Association association)
association
- the given associationSet
if the association has been shutdownSet<SocketAddress> getRemoteAddresses()
getRemoteAddresses
in interface ISctpSession
IFuture<Void> write(byte[] msg)
com.sun.nio.sctp.MessageInfo
created based on the default values for
address
, streamNumber
, payloadProtocolID
and
unordered
that were read from the session's configuration during
creation of this session.
The operation is asynchronous.
write
in interface ISctpSession
msg
- the byte array containing the message to be writtenIllegalSessionStateException
- if this session is not openIllegalStateException
- if the default peer address is not set in the session's configurationIFuture<Void> write(byte[] msg, int offset, int length)
com.sun.nio.sctp.MessageInfo
created based on the default
values for address
, streamNumber
, payloadProtocolID
and unordered
that were read from the session's configuration during
creation of this session.
The operation is asynchronous.
write
in interface ISctpSession
msg
- the byte array containing the message to be writtenoffset
- offset within the array of the first byte to be writtenlength
- number of bytes to be writtenIllegalSessionStateException
- if this session is not openIllegalStateException
- if the default peer address is not set in the session's configurationvoid writenf(byte[] msg)
com.sun.nio.sctp.MessageInfo
created based on the default values for
address
, streamNumber
, payloadProtocolID
and
unordered
that were read from the session's configuration during
creation of this session.
The operation is asynchronous.
This method should be used whenever there will be no need to synchronize on a future object. This will save some resources and may improve performance.
writenf
in interface ISctpSession
msg
- the byte array containing the message to be writtenIllegalSessionStateException
- if this session is not openIllegalStateException
- if the default peer address is not set in the session's configurationvoid writenf(byte[] msg, int offset, int length)
com.sun.nio.sctp.MessageInfo
created based on the default
values for address
, streamNumber
, payloadProtocolID
and unordered
that were read from the session's configuration during
creation of this session.
The operation is asynchronous.
This method should be used whenever there will be no need to synchronize on a future object. This will save some resources and may improve performance.
writenf
in interface ISctpSession
msg
- the byte array containing the message to be writtenoffset
- offset within the array of the first byte to be writtenlength
- number of bytes to be writtenIllegalSessionStateException
- if this session is not openIllegalStateException
- if the default peer address is not set in the session's configurationIFuture<Void> write(ByteBuffer msg)
com.sun.nio.sctp.MessageInfo
created based on the default values for
address
, streamNumber
, payloadProtocolID
and
unordered
that were read from the session's configuration during
creation of this session.
The operation is asynchronous.
write
in interface ISctpSession
msg
- the byte array containing the message to be writtenIllegalSessionStateException
- if this session is not openIllegalStateException
- if the default peer address is not set in the session's configurationIFuture<Void> write(ByteBuffer msg, int length)
com.sun.nio.sctp.MessageInfo
created based on the default
values for address
, streamNumber
, payloadProtocolID
and unordered
that were read from the session's configuration during
creation of this session.
The operation is asynchronous.
write
in interface ISctpSession
msg
- the byte array containing the message to be writtenlength
- number of bytes to be writtenIllegalSessionStateException
- if this session is not openIllegalStateException
- if the default peer address is not set in the session's configurationvoid writenf(ByteBuffer msg)
com.sun.nio.sctp.MessageInfo
created based on the default values for
address
, streamNumber
, payloadProtocolID
and
unordered
that were read from the session's configuration during
creation of this session.
The operation is asynchronous.
This method should be used whenever there will be no need to synchronize on a future object. This will save some resources and may improve performance.
writenf
in interface ISctpSession
msg
- the byte array containing the message to be writtenIllegalSessionStateException
- if this session is not openIllegalStateException
- if the default peer address is not set in the session's configurationvoid writenf(ByteBuffer msg, int length)
com.sun.nio.sctp.MessageInfo
created based on the default
values for address
, streamNumber
, payloadProtocolID
and unordered
that were read from the session's configuration during
creation of this session.
The operation is asynchronous.
This method should be used whenever there will be no need to synchronize on a future object. This will save some resources and may improve performance.
writenf
in interface ISctpSession
msg
- the byte array containing the message to be writtenlength
- number of bytes to be writtenIllegalSessionStateException
- if this session is not openIllegalStateException
- if the default peer address is not set in the session's configurationIFuture<Void> write(Object msg)
com.sun.nio.sctp.MessageInfo
created based on the default values for address
,
streamNumber
, payloadProtocolID
and unordered
that
were read from the session's configuration during creation of this session.
The operation is asynchronous.
This method usually requires that the session has configured a codec pipeline
with at least one encoder that accepts the msg as the inbound data. If a
codec pipeline is not configured or no encoder accept the msg object it still
accepts messages that are of the byte[]
or ByteBuffer
type.
write
in interface ISctpSession
msg
- the byte array containing the message to be writtenIllegalSessionStateException
- if this session is not openIllegalStateException
- if the default peer address is not set in the session's configurationvoid writenf(Object msg)
com.sun.nio.sctp.MessageInfo
created based on the default values for address
,
streamNumber
, payloadProtocolID
and unordered
that
were read from the session's configuration during creation of this session.
The operation is asynchronous.
This method usually requires that the session has configured a codec pipeline
with at least one encoder that accepts the msg as the inbound data. If a
codec pipeline is not configured or no encoder accept the msg object it still
accepts messages that are of the byte[]
or ByteBuffer
type.
This method should be used whenever there will be no need to synchronize on a future object. This will save some resources and may improve performance.
writenf
in interface ISctpSession
msg
- the byte array containing the message to be writtenIllegalSessionStateException
- if this session is not openIllegalStateException
- if the default peer address is not set in the session's configurationCopyright © 2017–2022 SNF4J.ORG. All rights reserved.