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 protectedAbstractOioByteChannel(Channel parent)Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected abstract intavailable()Deprecated.Return the number of bytes ready to read from the underlying Socket.protected voiddoRead()Deprecated.protected abstract intdoReadBytes(ByteBuf buf)Deprecated.Read bytes from the underlying Socket.protected voiddoWrite(ChannelOutboundBuffer in)Deprecated.Flush the content of the given buffer to the remote peer.protected abstract voiddoWriteBytes(ByteBuf buf)Deprecated.Write the data which is hold by theByteBufto the underlying Socket.protected abstract voiddoWriteFileRegion(FileRegion region)Deprecated.Write the data which is hold by theFileRegionto the underlying Socket.protected java.lang.ObjectfilterOutboundMessage(java.lang.Object msg)Deprecated.Invoked when a new message is added to aChannelOutboundBufferof thisAbstractChannel, so that theChannelimplementation converts the message to another.protected abstract booleanisInputShutdown()Deprecated.Determine if the input side of this channel is shutdown.ChannelMetadatametadata()Deprecated.protected abstract ChannelFutureshutdownInput()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:
trueif 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:
doReadin classAbstractOioChannel
-
doWrite
protected void doWrite(ChannelOutboundBuffer in) throws java.lang.Exception
Deprecated.Description copied from class:AbstractChannelFlush the content of the given buffer to the remote peer.- Specified by:
doWritein classAbstractChannel- Throws:
java.lang.Exception
-
filterOutboundMessage
protected final java.lang.Object filterOutboundMessage(java.lang.Object msg) throws java.lang.ExceptionDeprecated.Description copied from class:AbstractChannelInvoked when a new message is added to aChannelOutboundBufferof thisAbstractChannel, so that theChannelimplementation converts the message to another. (e.g. heap buffer -> direct buffer)- Overrides:
filterOutboundMessagein 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- theByteBufinto 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 theByteBufto the underlying Socket.- Parameters:
buf- theByteBufwhich 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 theFileRegionto the underlying Socket.- Parameters:
region- theFileRegionwhich holds the data to transfer- Throws:
java.lang.Exception- is thrown if an error occurred
-
-