public interface ISctpSession extends ISession
ISession
interface to cover SCTP functionalities.Modifier and Type | Method and Description |
---|---|
IFuture<Void> |
bindAddress(InetAddress address)
Adds the given address to the bound addresses for the SCTP channel's socket
associated with this session
|
com.sun.nio.sctp.Association |
getAssociation()
Returns the association on the SCTP channel's socket associated with this
session
|
ICodecPipeline |
getCodecPipeline(Object identifier)
Gets the codec pipeline that is associated with this session and is
identified by the given identifier.
|
ISctpHandler |
getHandler()
Gets the SCTP handler associated with this session
|
SocketAddress |
getLocalAddress()
Returns one of the local addresses this session is bound to.
|
Set<SocketAddress> |
getLocalAddresses()
Returns all of the socket addresses to which the SCTP channel associated with
this session is bound.
|
ISctpSession |
getParent()
Gets the parent session.
|
SocketAddress |
getRemoteAddress()
Returns one of the remote addresses to which this session is connected.
|
Set<SocketAddress> |
getRemoteAddresses()
Returns all of the remote addresses to which the SCTP channel associated with
this session is connected.
|
IFuture<Void> |
unbindAddress(InetAddress address)
Removes the given address from the bound addresses for the SCTP channel's
socket associated with 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,
ImmutableSctpMessageInfo msgInfo)
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(byte[] msg,
int offset,
int length,
ImmutableSctpMessageInfo msgInfo)
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,
ImmutableSctpMessageInfo msgInfo)
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(ByteBuffer msg,
int length,
ImmutableSctpMessageInfo msgInfo)
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.
|
IFuture<Void> |
write(Object msg,
ImmutableSctpMessageInfo msgInfo)
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,
ImmutableSctpMessageInfo msgInfo)
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(byte[] msg,
int offset,
int length,
ImmutableSctpMessageInfo msgInfo)
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,
ImmutableSctpMessageInfo msgInfo)
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(ByteBuffer msg,
int length,
ImmutableSctpMessageInfo msgInfo)
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.
|
void |
writenf(Object msg,
ImmutableSctpMessageInfo msgInfo)
Writes a message to the SCTP channel that is associated with this session.
|
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
ISctpHandler getHandler()
getHandler
in interface ISession
ISctpSession getParent()
ISession
Some sessions may not implement its own I/O functionalities and use their parent's ones instead.
ICodecPipeline getCodecPipeline(Object identifier)
identifier
- the identifier of the codec pipelinenull
if the session does not support it
or it has not been created yetcom.sun.nio.sctp.Association getAssociation()
null
if the SCTP channel's socket is not
connectedIFuture<Void> bindAddress(InetAddress address)
address
- the address to add to the bound addressesIFuture<Void> unbindAddress(InetAddress address)
address
- the address to remove from the bound addressesSocketAddress getLocalAddress()
NOTE: The return address cannot be treated as the local primary address. It is the application's responsibility to keep track of it's local primary address.
getLocalAddress
in interface ISession
null
if this session is not
bound yetSocket
SocketAddress getRemoteAddress()
NOTE: The return address cannot be treated as the peer's primary address. It is the application's responsibility to keep track of it's peer's primary address.
getRemoteAddress
in interface ISession
null
if this session is not
connected yetSocket
Set<SocketAddress> getLocalAddresses()
Set<SocketAddress> getRemoteAddresses()
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.
msg
- the byte array containing the message to be writtenIllegalSessionStateException
- if this session is not openIFuture<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.
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 openIFuture<Void> write(byte[] msg, ImmutableSctpMessageInfo msgInfo)
com.sun.nio.sctp.MessageInfo
created based on the specified immutable
ancillary data.
The operation is asynchronous.
msg
- the byte array containing the message to be writtenmsgInfo
- immutable ancillary data about the message to be writtenIllegalSessionStateException
- if this session is not openIFuture<Void> write(byte[] msg, int offset, int length, ImmutableSctpMessageInfo msgInfo)
com.sun.nio.sctp.MessageInfo
created based on the specified immutable
ancillary data.
The operation is asynchronous.
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 writtenmsgInfo
- immutable ancillary data about the message to be writtenIllegalSessionStateException
- if this session is not openvoid 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.
msg
- the byte array containing the message to be writtenIllegalSessionStateException
- if this session is not openvoid 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.
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 openvoid writenf(byte[] msg, ImmutableSctpMessageInfo msgInfo)
com.sun.nio.sctp.MessageInfo
created based on the specified immutable
ancillary data.
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.
msg
- the byte array containing the message to be writtenmsgInfo
- immutable ancillary data about the message to be writtenIllegalSessionStateException
- if this session is not openvoid writenf(byte[] msg, int offset, int length, ImmutableSctpMessageInfo msgInfo)
com.sun.nio.sctp.MessageInfo
created based on the specified immutable
ancillary data.
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.
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 writtenmsgInfo
- immutable ancillary data about the message to be writtenIllegalSessionStateException
- if this session is not openIFuture<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.
msg
- the byte array containing the message to be writtenIllegalSessionStateException
- if this session is not openIFuture<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.
msg
- the byte array containing the message to be writtenlength
- number of bytes to be writtenIllegalSessionStateException
- if this session is not openIFuture<Void> write(ByteBuffer msg, ImmutableSctpMessageInfo msgInfo)
com.sun.nio.sctp.MessageInfo
created based on the specified immutable
ancillary data.
The operation is asynchronous.
msg
- the byte array containing the message to be writtenmsgInfo
- immutable ancillary data about the message to be writtenIllegalSessionStateException
- if this session is not openIFuture<Void> write(ByteBuffer msg, int length, ImmutableSctpMessageInfo msgInfo)
com.sun.nio.sctp.MessageInfo
created based on the specified immutable
ancillary data.
The operation is asynchronous.
msg
- the byte array containing the message to be writtenlength
- number of bytes to be writtenmsgInfo
- immutable ancillary data about the message to be writtenIllegalSessionStateException
- if this session is not openvoid 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.
msg
- the byte array containing the message to be writtenIllegalSessionStateException
- if this session is not openvoid 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.
msg
- the byte array containing the message to be writtenlength
- number of bytes to be writtenIllegalSessionStateException
- if this session is not openvoid writenf(ByteBuffer msg, ImmutableSctpMessageInfo msgInfo)
com.sun.nio.sctp.MessageInfo
created based on the specified immutable
ancillary data.
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.
msg
- the byte array containing the message to be writtenmsgInfo
- immutable ancillary data about the message to be writtenIllegalSessionStateException
- if this session is not openvoid writenf(ByteBuffer msg, int length, ImmutableSctpMessageInfo msgInfo)
com.sun.nio.sctp.MessageInfo
created based on the specified immutable
ancillary data.
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.
msg
- the byte array containing the message to be writtenlength
- number of bytes to be writtenmsgInfo
- immutable ancillary data about the message to be writtenIllegalSessionStateException
- if this session is not openIFuture<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.
msg
- the byte array containing the message to be writtenIllegalSessionStateException
- if this session is not openIFuture<Void> write(Object msg, ImmutableSctpMessageInfo msgInfo)
com.sun.nio.sctp.MessageInfo
created based on the specified immutable ancillary data.
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.
msg
- the byte array containing the message to be writtenmsgInfo
- immutable ancillary data about the message to be writtenIllegalSessionStateException
- if this session is not openvoid 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.
msg
- the byte array containing the message to be writtenIllegalSessionStateException
- if this session is not openvoid writenf(Object msg, ImmutableSctpMessageInfo msgInfo)
com.sun.nio.sctp.MessageInfo
created based on the specified immutable ancillary data.
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.
msg
- the byte array containing the message to be writtenmsgInfo
- immutable ancillary data about the message to be writtenIllegalSessionStateException
- if this session is not openCopyright © 2017–2022 SNF4J.ORG. All rights reserved.