public abstract class AbstractNioByteChannel extends AbstractNioChannel
AbstractNioChannel base class for Channels that operate on bytes.AbstractNioChannel.AbstractNioUnsafe, AbstractNioChannel.NioUnsafeAbstractChannel.AbstractUnsafeChannel.UnsafereadInterestOp| Modifier | Constructor and Description |
|---|---|
protected |
AbstractNioByteChannel(Channel parent,
EventLoop eventLoop,
SelectableChannel ch)
Create a new instance
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
clearOpWrite() |
protected abstract int |
doReadBytes(io.netty.buffer.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(io.netty.buffer.ByteBuf buf)
Write bytes form the given
ByteBuf to the underlying Channel. |
protected abstract long |
doWriteFileRegion(FileRegion region)
Write a
FileRegion |
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, doConnect, doDeregister, doFinishConnect, doRegister, eventLoop, isCompatible, isInputShutdown, isOpen, javaChannel, selectionKey, unsafealloc, bind, bind, checkEOF, close, close, closeFuture, compareTo, connect, connect, connect, connect, disconnect, disconnect, doBind, doClose, doDisconnect, equals, flush, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, localAddress, localAddress0, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, remoteAddress, remoteAddress0, toString, voidPromise, write, write, writeAndFlush, writeAndFlushprotected AbstractNioByteChannel(Channel parent, EventLoop eventLoop, SelectableChannel ch)
parent - the parent Channel by which this instance was created. May be nullch - the underlying SelectableChannel on which it operatesprotected 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 Exception
AbstractChanneldoWrite in class AbstractChannelExceptionprotected final void incompleteWrite(boolean setOpWrite)
protected abstract long doWriteFileRegion(FileRegion region) throws Exception
FileRegionregion - the FileRegion from which the bytes should be writtenExceptionprotected abstract int doReadBytes(io.netty.buffer.ByteBuf buf)
throws Exception
ByteBuf and return the amount.Exceptionprotected abstract int doWriteBytes(io.netty.buffer.ByteBuf buf)
throws Exception
ByteBuf to the underlying Channel.buf - the ByteBuf from which the bytes should be writtenExceptionprotected final void setOpWrite()
protected final void clearOpWrite()
Copyright © 2008–2013 The Netty Project. All rights reserved.