public class OioSctpChannel extends AbstractOioMessageChannel implements SctpChannel
SctpChannel使用阻塞模式并允许读/写SctpMessage到底层SctpChannel 。
请注意,并非所有的操作系统都支持SCTP。
请参阅操作系统的文档,了解您需要如何使用它。
此功能也仅在Java 7+上受支持。
AbstractChannel.AbstractUnsafeChannel.UnsafeSO_TIMEOUT| Constructor and Description |
|---|
OioSctpChannel()
用新的
SctpChannel创建一个新实例。
|
OioSctpChannel(Channel parent, com.sun.nio.sctp.SctpChannel ch)
从给定的
SctpChannel创建一个新实例。
|
OioSctpChannel(com.sun.nio.sctp.SctpChannel ch)
从给定的
SctpChannel创建一个新的实例。
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<java.net.InetSocketAddress> |
allLocalAddresses()
返回SCTP通道的所有本地地址。
|
java.util.Set<java.net.InetSocketAddress> |
allRemoteAddresses()
返回SCTP服务器通道的所有远程地址。
|
com.sun.nio.sctp.Association |
association()
返回底层的SCTP关联。
|
ChannelFuture |
bindAddress(java.net.InetAddress localAddress)
将地址绑定到已绑定的通道以启用多宿主。
|
ChannelFuture |
bindAddress(java.net.InetAddress localAddress, ChannelPromise promise)
将地址绑定到已绑定的通道以启用多宿主。
|
SctpChannelConfig |
config()
返回通道的 SctpChannelConfig配置。
|
protected void |
doBind(java.net.SocketAddress localAddress)
将 Channel绑定到SocketAddress
|
protected void |
doClose()
关闭 Channel
|
protected void |
doConnect(java.net.SocketAddress remoteAddress, java.net.SocketAddress localAddress)
如果指定了localAddress,则使用给定的localAddress连接到远程对等,否则连接到
null 。
|
protected void |
doDisconnect()
将此 Channel从其远程对等方断开
|
protected int |
doReadMessages(java.util.List<java.lang.Object> msgs)
将消息读入给定数组并返回读取的数量。
|
protected void |
doWrite(ChannelOutboundBuffer in)
将给定缓冲区的内容刷新到远程对等体。
|
protected java.lang.Object |
filterOutboundMessage(java.lang.Object msg)
在将新消息添加到此 AbstractChannel的ChannelOutboundBuffer时调用 ,以便Channel实现将消息转换为另一个消息。
|
boolean |
isActive()
如果 Channel处于活动状态并已连接,则返回true 。
|
boolean |
isOpen()
如果 Channel已打开并且稍后可能会激活,则返回true
|
java.net.InetSocketAddress |
localAddress()
返回此通道绑定的本地地址。
|
protected java.net.SocketAddress |
localAddress0()
返回本地绑定的
SocketAddress 。
|
ChannelMetadata |
metadata()
返回 ChannelMetadata的的Channel其描述的性质Channel 。
|
SctpServerChannel |
parent()
返回此频道的父级。
|
java.net.InetSocketAddress |
remoteAddress()
返回此通道连接到的远程地址。
|
protected java.net.SocketAddress |
remoteAddress0()
返回 SocketAddress连接的SocketAddress 。
|
ChannelFuture |
unbindAddress(java.net.InetAddress localAddress)
从通道的多址地址列表中解除绑定地址。
|
ChannelFuture |
unbindAddress(java.net.InetAddress localAddress, ChannelPromise promise)
从通道的多址地址列表中解除绑定地址。
|
doReadclearReadPending, doBeginRead, isCompatible, isReadPending, newUnsafe, setReadPendingalloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, close, close, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, doDeregister, doRegister, doShutdownOutput, equals, eventLoop, flush, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, newChannelPipeline, newFailedFuture, newId, newProgressivePromise, newPromise, newSucceededFuture, pipeline, read, toString, unsafe, voidPromise, write, write, writeAndFlush, writeAndFlushattr, hasAttrclone, finalize, getClass, notify, notifyAll, wait, wait, waitalloc, bytesBeforeUnwritable, bytesBeforeWritable, closeFuture, eventLoop, flush, id, isRegistered, isWritable, pipeline, read, unsafeattr, hasAttrbind, bind, close, close, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, voidPromise, write, write, writeAndFlush, writeAndFlushpublic OioSctpChannel()
SctpChannel创建一个新实例。
public OioSctpChannel(com.sun.nio.sctp.SctpChannel ch)
SctpChannel创建一个新的实例。
ch - 此实例使用的
SctpChannel
public java.net.InetSocketAddress localAddress()
Channel复制的描述
SocketAddress应该被转换为更具体的类型,例如InetSocketAddress来检索详细信息。
localAddress ,界面
Channel
localAddress在界面
SctpChannel
localAddress在课堂上
AbstractChannel
null如果此通道未绑定。
public java.net.InetSocketAddress remoteAddress()
Channel复制的描述
SocketAddress被假定为更具体的类型,如InetSocketAddress以检索详细信息。
remoteAddress在界面
Channel
remoteAddress ,界面
SctpChannel
remoteAddress在类
AbstractChannel
null如果此通道未连接。
如果此通道未连接,但它可以接收来自任意远程地址的消息(例如DatagramChannel ,请使用DefaultAddressedEnvelope.recipient()来确定接收消息的来源,因为此方法将返回null 。
public SctpServerChannel parent()
Channel
parent ,界面
Channel
parent ,界面
SctpChannel
parent在课堂上
AbstractChannel
null如果此频道没有父频道。
public ChannelMetadata metadata()
Channel复制的描述
ChannelMetadata的的Channel其描述的性质Channel 。
public SctpChannelConfig config()
SctpChannel复制的描述
SctpChannelConfig配置。
config ,界面
Channel
config在界面
SctpChannel
protected int doReadMessages(java.util.List<java.lang.Object> msgs)
throws java.lang.Exception
AbstractOioMessageChannel
doReadMessages在课堂上
AbstractOioMessageChannel
java.lang.Exception
protected void doWrite(ChannelOutboundBuffer in) throws java.lang.Exception
AbstractChannel
doWrite ,等级
AbstractChannel
java.lang.Exception
protected java.lang.Object filterOutboundMessage(java.lang.Object msg)
throws java.lang.Exception
AbstractChannel
AbstractChannel的ChannelOutboundBuffer时调用 ,以便Channel实现将消息转换为另一个消息。
(例如堆缓冲区 - >直接缓冲区)
filterOutboundMessage在课堂上
AbstractChannel
java.lang.Exception
public com.sun.nio.sctp.Association association()
SctpChannel复制的描述
association ,界面
SctpChannel
protected java.net.SocketAddress localAddress0()
AbstractChannel
SocketAddress 。
localAddress0的
AbstractChannel
public java.util.Set<java.net.InetSocketAddress> allLocalAddresses()
SctpChannel
allLocalAddresses ,界面
SctpChannel
protected java.net.SocketAddress remoteAddress0()
AbstractChannel
SocketAddress其中Channel被连接到。
remoteAddress0在课堂上
AbstractChannel
public java.util.Set<java.net.InetSocketAddress> allRemoteAddresses()
SctpChannel
allRemoteAddresses ,界面
SctpChannel
protected void doBind(java.net.SocketAddress localAddress)
throws java.lang.Exception
AbstractChannel
Channel绑定到SocketAddress
doBind在类
AbstractChannel
java.lang.Exception
protected void doConnect(java.net.SocketAddress remoteAddress,
java.net.SocketAddress localAddress)
throws java.lang.Exception
AbstractOioChannel
null 。
doConnect在类
AbstractOioChannel
java.lang.Exception
protected void doDisconnect()
throws java.lang.Exception
AbstractChannel
Channel与其远程对等端的连接
doDisconnect
AbstractChannel
java.lang.Exception
protected void doClose()
throws java.lang.Exception
AbstractChannel
Channel
doClose
AbstractChannel
java.lang.Exception
public ChannelFuture bindAddress(java.net.InetAddress localAddress)
SctpChannel
bindAddress ,界面
SctpChannel
public ChannelFuture bindAddress(java.net.InetAddress localAddress, ChannelPromise promise)
SctpChannel复制的描述
bindAddress在界面
SctpChannel
public ChannelFuture unbindAddress(java.net.InetAddress localAddress)
SctpChannel
unbindAddress ,界面
SctpChannel
public ChannelFuture unbindAddress(java.net.InetAddress localAddress, ChannelPromise promise)
SctpChannel复制的描述
unbindAddress在界面
SctpChannel
Copyright © 2008–2018 The Netty Project. All rights reserved.