public abstract class AbstractNioByteChannel extends AbstractNioChannel
AbstractNioChannel base class for Channels that operate on bytes.| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractNioByteChannel.NioByteUnsafe |
AbstractNioChannel.AbstractNioUnsafe, AbstractNioChannel.NioUnsafeAbstractChannel.AbstractUnsafeChannel.UnsafereadInterestOp| Modifier | Constructor and Description |
|---|---|
protected |
AbstractNioByteChannel(Channel parent,
java.nio.channels.SelectableChannel ch)
Create a new instance
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
clearOpWrite() |
protected abstract int |
doReadBytes(ByteBuf buf)
Read bytes into the given
ByteBuf and return the amount. |
protected void |
doWrite(ChannelOutboundBuffer in)
Flush the content of the given buffer to the remote peer.
|
protected abstract int |
doWriteBytes(ByteBuf buf)
Write bytes form the given
ByteBuf to the underlying Channel. |
protected abstract long |
doWriteFileRegion(FileRegion region)
Write a
FileRegion |
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 void |
incompleteWrite(boolean setOpWrite) |
protected AbstractNioChannel.AbstractNioUnsafe |
newUnsafe()
Create a new
AbstractChannel.AbstractUnsafe instance which will be used for the life-time of the Channel |
protected void |
setOpWrite() |
doBeginRead, doClose, doConnect, doDeregister, doFinishConnect, doRegister, eventLoop, isCompatible, isInputShutdown, isOpen, isReadPending, javaChannel, newDirectBuffer, newDirectBuffer, selectionKey, setReadPending, unsafealloc, bind, bind, close, close, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, doBind, doDisconnect, doShutdownOutput, equals, flush, hashCode, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, localAddress, localAddress0, newChannelPipeline, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, remoteAddress, remoteAddress0, toString, voidPromise, write, write, writeAndFlush, writeAndFlushattrclone, finalize, getClass, notify, notifyAll, wait, wait, waitattrprotected AbstractNioChannel.AbstractNioUnsafe newUnsafe()
AbstractChannelAbstractChannel.AbstractUnsafe instance which will be used for the life-time of the ChannelnewUnsafe in class AbstractChannelprotected void doWrite(ChannelOutboundBuffer in) throws java.lang.Exception
AbstractChanneldoWrite in class AbstractChanneljava.lang.Exceptionprotected final java.lang.Object filterOutboundMessage(java.lang.Object msg)
AbstractChannelChannelOutboundBuffer of this AbstractChannel, so that
the Channel implementation converts the message to another. (e.g. heap buffer -> direct buffer)filterOutboundMessage in class AbstractChannelprotected final void incompleteWrite(boolean setOpWrite)
protected abstract long doWriteFileRegion(FileRegion region) throws java.lang.Exception
FileRegionregion - the FileRegion from which the bytes should be writtenjava.lang.Exceptionprotected abstract int doReadBytes(ByteBuf buf) throws java.lang.Exception
ByteBuf and return the amount.java.lang.Exceptionprotected abstract int doWriteBytes(ByteBuf buf) throws java.lang.Exception
ByteBuf to the underlying Channel.buf - the ByteBuf from which the bytes should be writtenjava.lang.Exceptionprotected final void setOpWrite()
protected final void clearOpWrite()
Copyright © 2008–2018 The Netty Project. All rights reserved.