public abstract class AbstractOioByteChannel extends AbstractOioChannel
AbstractChannel.AbstractUnsafe
Channel.Unsafe
SO_TIMEOUT
Modifier | Constructor and Description |
---|---|
protected |
AbstractOioByteChannel(Channel parent) |
Modifier and Type | Method and Description |
---|---|
protected abstract int |
available()
返回准备从底层套接字读取的字节数。
|
protected void |
doRead() |
protected abstract int |
doReadBytes(ByteBuf buf)
从底层套接字读取字节。
|
protected void |
doWrite(ChannelOutboundBuffer in)
将给定缓冲区的内容刷新到远程对等体。
|
protected abstract void |
doWriteBytes(ByteBuf buf)
将由 ByteBuf 保存的数据写入底层套接字。
|
protected abstract void |
doWriteFileRegion(FileRegion region)
将由 FileRegion 保存的数据写入底层套接字。
|
protected java.lang.Object |
filterOutboundMessage(java.lang.Object msg)
在将新消息添加到此 AbstractChannel 的ChannelOutboundBuffer 时调用 ,以便Channel 实现将消息转换为另一个消息。
|
protected abstract boolean |
isInputShutdown()
确定此通道的输入端是否已关闭。
|
ChannelMetadata |
metadata()
返回 ChannelMetadata 的的Channel 其描述的性质Channel 。
|
protected abstract ChannelFuture |
shutdownInput()
关闭此通道的输入端。
|
clearReadPending, doBeginRead, doConnect, isCompatible, isReadPending, newUnsafe, setReadPending
alloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, close, close, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, doBind, doClose, doDeregister, doDisconnect, doRegister, doShutdownOutput, equals, eventLoop, flush, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, localAddress, localAddress0, newChannelPipeline, newFailedFuture, newId, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, remoteAddress, remoteAddress0, toString, unsafe, voidPromise, write, write, writeAndFlush, writeAndFlush
attr, hasAttr
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
attr, hasAttr
protected AbstractOioByteChannel(Channel parent)
public ChannelMetadata metadata()
Channel
复制的描述
ChannelMetadata
的的Channel
其描述的性质Channel
。
protected abstract boolean isInputShutdown()
true
如果此通道的输入端已关闭。
protected abstract ChannelFuture shutdownInput()
protected void doRead()
doRead
在课堂上
AbstractOioChannel
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) throws java.lang.Exception
AbstractChannel
AbstractChannel
的ChannelOutboundBuffer
时调用 ,以便Channel
实现将消息转换为另一个消息。
(例如堆缓冲区 - >直接缓冲区)
filterOutboundMessage
AbstractChannel
java.lang.Exception
protected abstract int available()
protected abstract int doReadBytes(ByteBuf buf) throws java.lang.Exception
buf
- 写入读取字节的ByteBuf
java.lang.Exception
- 发生错误时抛出
protected abstract void doWriteBytes(ByteBuf buf) throws java.lang.Exception
ByteBuf
持有的数据写入底层套接字。
buf
- 持有要传输的数据的ByteBuf
java.lang.Exception
- 发生错误时抛出
protected abstract void doWriteFileRegion(FileRegion region) throws java.lang.Exception
FileRegion
保存的数据写入底层套接字。
region
- 持有要传输的数据的FileRegion
java.lang.Exception
- 发生错误时抛出
Copyright © 2008–2018 The Netty Project. All rights reserved.