Package io.netty.channel.oio
Class AbstractOioByteChannel
java.lang.Object
io.netty.util.DefaultAttributeMap
io.netty.channel.AbstractChannel
io.netty.channel.oio.AbstractOioChannel
io.netty.channel.oio.AbstractOioByteChannel
- All Implemented Interfaces:
Channel
,ChannelOutboundInvoker
,AttributeMap
,Comparable<Channel>
- Direct Known Subclasses:
OioByteStreamChannel
Deprecated.
use NIO / EPOLL / KQUEUE transport.
Abstract base class for OIO which reads and writes bytes from/to a Socket
-
Nested Class Summary
Nested classes/interfaces inherited from class io.netty.channel.AbstractChannel
AbstractChannel.AbstractUnsafe
Nested classes/interfaces inherited from interface io.netty.channel.Channel
Channel.Unsafe
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
Deprecated.private static final ChannelMetadata
Deprecated.Fields inherited from class io.netty.channel.oio.AbstractOioChannel
readPending, readTask, readWhenInactive, SO_TIMEOUT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract int
Deprecated.Return the number of bytes ready to read from the underlying Socket.private void
closeOnRead
(ChannelPipeline pipeline) Deprecated.protected void
doRead()
Deprecated.protected abstract int
doReadBytes
(ByteBuf buf) Deprecated.Read bytes from the underlying Socket.protected void
Deprecated.Flush the content of the given buffer to the remote peer.protected abstract void
doWriteBytes
(ByteBuf buf) Deprecated.Write the data which is hold by theByteBuf
to the underlying Socket.protected abstract void
doWriteFileRegion
(FileRegion region) Deprecated.Write the data which is hold by theFileRegion
to the underlying Socket.protected final Object
Deprecated.Invoked when a new message is added to aChannelOutboundBuffer
of thisAbstractChannel
, so that theChannel
implementation converts the message to another.private void
handleReadException
(ChannelPipeline pipeline, ByteBuf byteBuf, Throwable cause, boolean close, RecvByteBufAllocator.Handle allocHandle) Deprecated.protected abstract boolean
Deprecated.Determine if the input side of this channel is shutdown.metadata()
Deprecated.protected abstract ChannelFuture
Deprecated.Shutdown the input side of this channel.Methods inherited from class io.netty.channel.oio.AbstractOioChannel
clearReadPending, doBeginRead, doConnect, isCompatible, isReadPending, newUnsafe, setReadPending
Methods inherited from class io.netty.channel.AbstractChannel
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, maxMessagesPerWrite, newChannelPipeline, newFailedFuture, newId, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, remoteAddress, remoteAddress0, toString, unsafe, validateFileRegion, voidPromise, write, write, writeAndFlush, writeAndFlush
Methods inherited from class io.netty.util.DefaultAttributeMap
attr, hasAttr
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.netty.util.AttributeMap
attr, hasAttr
-
Field Details
-
METADATA
Deprecated. -
EXPECTED_TYPES
Deprecated.
-
-
Constructor Details
-
AbstractOioByteChannel
Deprecated.- See Also:
-
-
Method Details
-
metadata
Deprecated.Description copied from interface:Channel
-
isInputShutdown
protected abstract boolean isInputShutdown()Deprecated.Determine if the input side of this channel is shutdown.- Returns:
true
if the input side of this channel is shutdown.
-
shutdownInput
Deprecated.Shutdown the input side of this channel.- Returns:
- A channel future that will complete when the shutdown is complete.
-
closeOnRead
Deprecated. -
handleReadException
private void handleReadException(ChannelPipeline pipeline, ByteBuf byteBuf, Throwable cause, boolean close, RecvByteBufAllocator.Handle allocHandle) Deprecated. -
doRead
protected void doRead()Deprecated.- Specified by:
doRead
in classAbstractOioChannel
-
doWrite
Deprecated.Description copied from class:AbstractChannel
Flush the content of the given buffer to the remote peer.- Specified by:
doWrite
in classAbstractChannel
- Throws:
Exception
-
filterOutboundMessage
Deprecated.Description copied from class:AbstractChannel
Invoked when a new message is added to aChannelOutboundBuffer
of thisAbstractChannel
, so that theChannel
implementation converts the message to another. (e.g. heap buffer -> direct buffer)- Overrides:
filterOutboundMessage
in classAbstractChannel
- Throws:
Exception
-
available
protected abstract int available()Deprecated.Return the number of bytes ready to read from the underlying Socket. -
doReadBytes
Deprecated.Read bytes from the underlying Socket. -
doWriteBytes
Deprecated.Write the data which is hold by theByteBuf
to the underlying Socket. -
doWriteFileRegion
Deprecated.Write the data which is hold by theFileRegion
to the underlying Socket.- Parameters:
region
- theFileRegion
which holds the data to transfer- Throws:
Exception
- is thrown if an error occurred
-