public abstract class AbstractOioByteChannel extends AbstractOioChannel
AbstractChannel.AbstractUnsafeChannel.UnsafeSO_TIMEOUT| 限定符 | 构造器和说明 |
|---|---|
protected |
AbstractOioByteChannel(Channel parent) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected abstract int |
available()
Return the number of bytes ready to read from the underlying Socket.
|
protected boolean |
checkInputShutdown()
Check if the input was shutdown and if so return
true. |
protected void |
doRead() |
protected abstract int |
doReadBytes(ByteBuf buf)
Read bytes from the underlying Socket.
|
protected void |
doWrite(ChannelOutboundBuffer in)
Flush the content of the given buffer to the remote peer.
|
protected abstract void |
doWriteBytes(ByteBuf buf)
Write the data which is hold by the
ByteBuf to the underlying Socket. |
protected abstract void |
doWriteFileRegion(FileRegion region)
Write the data which is hold by the
FileRegion to the underlying Socket. |
protected java.lang.Object |
filterOutboundMessage(java.lang.Object msg)
Invoked when a new message is added to a
ChannelOutboundBuffer of this AbstractChannel, so that
the Channel implementation converts the message to another. |
protected boolean |
isInputShutdown() |
ChannelMetadata |
metadata()
|
doBeginRead, doConnect, isCompatible, isReadPending, newUnsafe, setReadPendingalloc, bind, bind, close, close, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, doBind, doClose, doDeregister, doDisconnect, doRegister, doShutdownOutput, equals, eventLoop, flush, hashCode, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, localAddress, localAddress0, newChannelPipeline, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, remoteAddress, remoteAddress0, toString, unsafe, voidPromise, write, write, writeAndFlush, writeAndFlushattrattrprotected AbstractOioByteChannel(Channel parent)
protected boolean isInputShutdown()
public ChannelMetadata metadata()
Channelprotected boolean checkInputShutdown()
true. The default implementation sleeps also for
AbstractOioChannel.SO_TIMEOUT milliseconds to simulate some blocking.protected void doRead()
doRead 在类中 AbstractOioChannelprotected void doWrite(ChannelOutboundBuffer in) throws java.lang.Exception
AbstractChanneldoWrite 在类中 AbstractChanneljava.lang.Exceptionprotected final java.lang.Object filterOutboundMessage(java.lang.Object msg)
throws java.lang.Exception
AbstractChannelChannelOutboundBuffer of this AbstractChannel, so that
the Channel implementation converts the message to another. (e.g. heap buffer -> direct buffer)filterOutboundMessage 在类中 AbstractChanneljava.lang.Exceptionprotected abstract int available()
protected abstract int doReadBytes(ByteBuf buf) throws java.lang.Exception
buf - the ByteBuf into which the read bytes will be writtenjava.lang.Exception - is thrown if an error occurredprotected abstract void doWriteBytes(ByteBuf buf) throws java.lang.Exception
ByteBuf to the underlying Socket.buf - the ByteBuf which holds the data to transferjava.lang.Exception - is thrown if an error occurredprotected abstract void doWriteFileRegion(FileRegion region) throws java.lang.Exception
FileRegion to the underlying Socket.region - the FileRegion which holds the data to transferjava.lang.Exception - is thrown if an error occurred