Package io.netty.channel.sctp
Interface SctpChannel
-
- All Superinterfaces:
AttributeMap
,Channel
,ChannelOutboundInvoker
,java.lang.Comparable<Channel>
- All Known Implementing Classes:
NioSctpChannel
,OioSctpChannel
public interface SctpChannel extends Channel
A SCTP/IPChannel
interface for single SCTP association.The SctpChannel is a message-oriented, connected transport which supports multi-streaming and multi-homing.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.channel.Channel
Channel.Unsafe
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Set<java.net.InetSocketAddress>
allLocalAddresses()
Return all local addresses of the SCTP channel.java.util.Set<java.net.InetSocketAddress>
allRemoteAddresses()
Return all remote addresses of the SCTP server channel.com.sun.nio.sctp.Association
association()
Returns the underlying SCTP association.ChannelFuture
bindAddress(java.net.InetAddress localAddress)
Bind a address to the already bound channel to enable multi-homing.ChannelFuture
bindAddress(java.net.InetAddress localAddress, ChannelPromise promise)
Bind a address to the already bound channel to enable multi-homing.SctpChannelConfig
config()
Returns theSctpChannelConfig
configuration of the channel.java.net.InetSocketAddress
localAddress()
Return the (primary) local address of the SCTP channel.SctpServerChannel
parent()
Returns the parent of this channel.java.net.InetSocketAddress
remoteAddress()
Return the (primary) remote address of the SCTP channel.ChannelFuture
unbindAddress(java.net.InetAddress localAddress)
Unbind the address from channel's multi-homing address list.ChannelFuture
unbindAddress(java.net.InetAddress localAddress, ChannelPromise promise)
Unbind the address from channel's multi-homing address list.-
Methods inherited from interface io.netty.util.AttributeMap
attr, hasAttr
-
Methods inherited from interface io.netty.channel.Channel
alloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, close, close, closeFuture, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, eventLoop, flush, getOption, id, isActive, isOpen, isRegistered, isWritable, metadata, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, pipeline, read, setOption, unsafe, voidPromise, write, write, writeAndFlush, writeAndFlush
-
-
-
-
Method Detail
-
parent
SctpServerChannel parent()
Description copied from interface:Channel
Returns the parent of this channel.
-
association
com.sun.nio.sctp.Association association()
Returns the underlying SCTP association.
-
localAddress
java.net.InetSocketAddress localAddress()
Return the (primary) local address of the SCTP channel. Please note that, this return the first local address in the underlying SCTP Channel's local address iterator to support Netty Channel API. In other words, its the application's responsibility to keep track of it's local primary address. (To set a local address as primary, the application can request by calling local SCTP stack, with SctpStandardSocketOption.SCTP_PRIMARY_ADDR option).- Specified by:
localAddress
in interfaceChannel
- Returns:
- the local address of this channel.
null
if this channel is not bound.
-
allLocalAddresses
java.util.Set<java.net.InetSocketAddress> allLocalAddresses()
Return all local addresses of the SCTP channel. Please note that, it will return more than one address if this channel is using multi-homing
-
config
SctpChannelConfig config()
Returns theSctpChannelConfig
configuration of the channel.
-
remoteAddress
java.net.InetSocketAddress remoteAddress()
Return the (primary) remote address of the SCTP channel. Please note that, this return the first remote address in the underlying SCTP Channel's remote address iterator to support Netty Channel API. In other words, its the application's responsibility to keep track of it's peer's primary address. (The application can request it's remote peer to set a specific address as primary by calling the local SCTP stack with SctpStandardSocketOption.SCTP_SET_PEER_PRIMARY_ADDR option)- Specified by:
remoteAddress
in interfaceChannel
- Returns:
- the remote address of this channel.
null
if this channel is not connected. If this channel is not connected but it can receive messages from arbitrary remote addresses (e.g.DatagramChannel
, useDefaultAddressedEnvelope.recipient()
to determine the origination of the received message as this method will returnnull
.
-
allRemoteAddresses
java.util.Set<java.net.InetSocketAddress> allRemoteAddresses()
Return all remote addresses of the SCTP server channel. Please note that, it will return more than one address if the remote is using multi-homing.
-
bindAddress
ChannelFuture bindAddress(java.net.InetAddress localAddress)
Bind a address to the already bound channel to enable multi-homing. The Channel bust be bound and yet to be connected.
-
bindAddress
ChannelFuture bindAddress(java.net.InetAddress localAddress, ChannelPromise promise)
Bind a address to the already bound channel to enable multi-homing. The Channel bust be bound and yet to be connected. Will notify the givenChannelPromise
and return aChannelFuture
-
unbindAddress
ChannelFuture unbindAddress(java.net.InetAddress localAddress)
Unbind the address from channel's multi-homing address list. The address should be added already in multi-homing address list.
-
unbindAddress
ChannelFuture unbindAddress(java.net.InetAddress localAddress, ChannelPromise promise)
Unbind the address from channel's multi-homing address list. The address should be added already in multi-homing address list. Will notify the givenChannelPromise
and return aChannelFuture
-
-