public abstract class AbstractServerChannel extends AbstractChannel implements ServerChannel
AbstractChannel.AbstractUnsafe
Channel.Unsafe
Modifier | Constructor and Description |
---|---|
protected |
AbstractServerChannel()
创建一个新的实例。
|
Modifier and Type | Method and Description |
---|---|
protected void |
doDisconnect()
将此 Channel 从其远程对等方断开
|
protected void |
doWrite(ChannelOutboundBuffer in)
将给定缓冲区的内容刷新到远程对等体。
|
protected java.lang.Object |
filterOutboundMessage(java.lang.Object msg)
在将新消息添加到此 AbstractChannel 的ChannelOutboundBuffer 中时调用 ,以便Channel 实现将消息转换为另一个消息。
|
ChannelMetadata |
metadata()
返回 ChannelMetadata 的的Channel 其描述的性质Channel 。
|
protected AbstractChannel.AbstractUnsafe |
newUnsafe()
创建一个新的 AbstractChannel.AbstractUnsafe 实例,该实例将用于Channel 的生命周期
|
java.net.SocketAddress |
remoteAddress()
返回此通道连接到的远程地址。
|
protected java.net.SocketAddress |
remoteAddress0()
返回 SocketAddress 其中Channel 被连接到。
|
alloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, close, close, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, doBeginRead, doBind, doClose, doDeregister, doRegister, doShutdownOutput, equals, eventLoop, flush, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isCompatible, isRegistered, isWritable, localAddress, localAddress0, newChannelPipeline, newFailedFuture, newId, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, toString, unsafe, voidPromise, write, write, writeAndFlush, writeAndFlush
attr, hasAttr
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
alloc, bytesBeforeUnwritable, bytesBeforeWritable, closeFuture, config, eventLoop, flush, id, isActive, isOpen, isRegistered, isWritable, localAddress, parent, pipeline, read, unsafe
attr, hasAttr
bind, bind, close, close, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, voidPromise, write, write, writeAndFlush, writeAndFlush
public ChannelMetadata metadata()
Channel
ChannelMetadata
的的Channel
其描述的性质Channel
。
public java.net.SocketAddress remoteAddress()
Channel
SocketAddress
被假定为更具体的类型,如InetSocketAddress
以检索详细信息。
remoteAddress
在界面
Channel
remoteAddress
在课程
AbstractChannel
null
。
如果此通道未连接,但它可以接收来自任意远程地址的消息(例如DatagramChannel
,请使用DefaultAddressedEnvelope.recipient()
确定收到消息的来源,因为此方法将返回null
。
protected java.net.SocketAddress remoteAddress0()
AbstractChannel
SocketAddress
其中Channel
被连接到。
remoteAddress0
在课程
AbstractChannel
protected void doDisconnect() throws java.lang.Exception
AbstractChannel
Channel
从其远程对等方断开
doDisconnect
在课堂
AbstractChannel
java.lang.Exception
protected AbstractChannel.AbstractUnsafe newUnsafe()
AbstractChannel
AbstractChannel.AbstractUnsafe
实例,该实例将用于Channel
的生命周期
newUnsafe
在课堂
AbstractChannel
protected void doWrite(ChannelOutboundBuffer in) throws java.lang.Exception
AbstractChannel
doWrite
AbstractChannel
java.lang.Exception
protected final java.lang.Object filterOutboundMessage(java.lang.Object msg)
AbstractChannel
AbstractChannel
的ChannelOutboundBuffer
时调用 ,以便Channel
实现将消息转换为另一个消息。
(例如堆缓冲区 - >直接缓冲区)
filterOutboundMessage
in class
AbstractChannel
Copyright © 2008–2018 The Netty Project. All rights reserved.