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
,java.lang.Comparable<Channel>
- Direct Known Subclasses:
OioByteStreamChannel
public abstract class AbstractOioByteChannel extends AbstractOioChannel
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
-
Fields inherited from class io.netty.channel.oio.AbstractOioChannel
SO_TIMEOUT
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractOioByteChannel(Channel parent)
Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected abstract int
available()
Deprecated.Return the number of bytes ready to read from the underlying Socket.protected void
doRead()
Deprecated.protected abstract int
doReadBytes(ByteBuf buf)
Deprecated.Read bytes from the underlying Socket.protected void
doWrite(ChannelOutboundBuffer in)
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 java.lang.Object
filterOutboundMessage(java.lang.Object msg)
Deprecated.Invoked when a new message is added to aChannelOutboundBuffer
of thisAbstractChannel
, so that theChannel
implementation converts the message to another.protected abstract boolean
isInputShutdown()
Deprecated.Determine if the input side of this channel is shutdown.ChannelMetadata
metadata()
Deprecated.protected abstract ChannelFuture
shutdownInput()
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
closeFuture, compareTo, doBind, doClose, doDeregister, doDisconnect, doRegister, doRegister, doShutdownOutput, equals, eventLoop, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, localAddress, localAddress0, maxMessagesPerWrite, newChannelPipeline, newId, parent, pipeline, remoteAddress, remoteAddress0, toString, unsafe, validateFileRegion, voidPromise
-
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
-
Methods inherited from interface io.netty.channel.Channel
alloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, close, close, config, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, flush, getOption, isActive, isOpen, isWritable, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, read, setOption, write, write, writeAndFlush, writeAndFlush
-
-
-
-
Constructor Detail
-
AbstractOioByteChannel
protected AbstractOioByteChannel(Channel parent)
Deprecated.- See Also:
AbstractOioByteChannel(Channel)
-
-
Method Detail
-
metadata
public ChannelMetadata 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
protected abstract ChannelFuture shutdownInput()
Deprecated.Shutdown the input side of this channel.- Returns:
- A channel future that will complete when the shutdown is complete.
-
doRead
protected void doRead()
Deprecated.- Specified by:
doRead
in classAbstractOioChannel
-
doWrite
protected void doWrite(ChannelOutboundBuffer in) throws java.lang.Exception
Deprecated.Description copied from class:AbstractChannel
Flush the content of the given buffer to the remote peer.- Specified by:
doWrite
in classAbstractChannel
- Throws:
java.lang.Exception
-
filterOutboundMessage
protected final java.lang.Object filterOutboundMessage(java.lang.Object msg) throws java.lang.Exception
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:
java.lang.Exception
-
available
protected abstract int available()
Deprecated.Return the number of bytes ready to read from the underlying Socket.
-
doReadBytes
protected abstract int doReadBytes(ByteBuf buf) throws java.lang.Exception
Deprecated.Read bytes from the underlying Socket.- Parameters:
buf
- theByteBuf
into which the read bytes will be written- Returns:
- amount the number of bytes read. This may return a negative amount if the underlying Socket was closed
- Throws:
java.lang.Exception
- is thrown if an error occurred
-
doWriteBytes
protected abstract void doWriteBytes(ByteBuf buf) throws java.lang.Exception
Deprecated.Write the data which is hold by theByteBuf
to the underlying Socket.- Parameters:
buf
- theByteBuf
which holds the data to transfer- Throws:
java.lang.Exception
- is thrown if an error occurred
-
doWriteFileRegion
protected abstract void doWriteFileRegion(FileRegion region) throws java.lang.Exception
Deprecated.Write the data which is hold by theFileRegion
to the underlying Socket.- Parameters:
region
- theFileRegion
which holds the data to transfer- Throws:
java.lang.Exception
- is thrown if an error occurred
-
-