public class LocalServerChannel extends AbstractServerChannel
ServerChannel
用于允许VM通信的本地传输。
AbstractChannel.AbstractUnsafe
Channel.Unsafe
Constructor and Description |
---|
LocalServerChannel() |
Modifier and Type | Method and Description |
---|---|
ChannelConfig |
config()
返回此频道的配置。
|
protected void |
doBeginRead()
安排读取操作。
|
protected void |
doBind(java.net.SocketAddress localAddress)
将 Channel 绑定到SocketAddress
|
protected void |
doClose()
关闭 Channel
|
protected void |
doDeregister()
|
protected void |
doRegister()
|
boolean |
isActive()
如果 Channel 处于活动状态并已连接,则返回true 。
|
protected boolean |
isCompatible(EventLoop loop)
如果给定的 EventLoop 与此实例兼容,则返回true 。
|
boolean |
isOpen()
如果 Channel 已打开并且稍后可能会激活,则返回true
|
LocalAddress |
localAddress()
返回此通道绑定的本地地址。
|
protected java.net.SocketAddress |
localAddress0()
返回本地绑定的
SocketAddress 。
|
protected LocalChannel |
newLocalChannel(LocalChannel peer)
LocalChannel 的工厂方法。
|
LocalAddress |
remoteAddress()
返回此通道连接到的远程地址。
|
doDisconnect, doWrite, filterOutboundMessage, metadata, newUnsafe, remoteAddress0
alloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, close, close, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, doShutdownOutput, equals, eventLoop, flush, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, 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, eventLoop, flush, id, isRegistered, isWritable, 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 ChannelConfig config()
Channel
复制的描述
public LocalAddress localAddress()
Channel
复制的描述
SocketAddress
应该被下调为更具体的类型,例如InetSocketAddress
以检索详细信息。
localAddress
,界面
Channel
localAddress
在课堂上
AbstractChannel
null
如果此通道未绑定。
public LocalAddress remoteAddress()
Channel
SocketAddress
应该被下调为更具体的类型,例如InetSocketAddress
以检索详细信息。
remoteAddress
接口
Channel
remoteAddress
在课堂上
AbstractServerChannel
null
如果此通道未连接。
如果此通道未连接,但可以接收来自任意远程地址的消息(例如DatagramChannel
,请使用DefaultAddressedEnvelope.recipient()
来确定接收消息的来源,因为此方法将返回null
。
protected boolean isCompatible(EventLoop loop)
AbstractChannel
EventLoop
与此实例兼容,则返回true
。
isCompatible
在课堂
AbstractChannel
protected java.net.SocketAddress localAddress0()
AbstractChannel
SocketAddress
。
localAddress0
在课堂上
AbstractChannel
protected void doRegister() throws java.lang.Exception
AbstractChannel
doRegister
AbstractChannel
java.lang.Exception
protected void doBind(java.net.SocketAddress localAddress) throws java.lang.Exception
AbstractChannel
Channel
绑定到SocketAddress
doBind
在课堂上
AbstractChannel
java.lang.Exception
protected void doClose() throws java.lang.Exception
AbstractChannel
Channel
doClose
在课堂上
AbstractChannel
java.lang.Exception
protected void doDeregister() throws java.lang.Exception
AbstractChannel
doDeregister
在课堂上
AbstractChannel
java.lang.Exception
protected void doBeginRead() throws java.lang.Exception
AbstractChannel
doBeginRead
在课堂
AbstractChannel
java.lang.Exception
protected LocalChannel newLocalChannel(LocalChannel peer)
LocalChannel
的工厂方法。
用户可以覆盖它以创建LocalChannel
的自定义实例。
Copyright © 2008–2018 The Netty Project. All rights reserved.