Class AbstractOioByteChannel

All Implemented Interfaces:
Channel, ChannelOutboundInvoker, AttributeMap, 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
  • Field Details

    • METADATA

      private static final ChannelMetadata METADATA
      Deprecated.
    • EXPECTED_TYPES

      private static final String EXPECTED_TYPES
      Deprecated.
  • Constructor Details

  • Method Details

    • metadata

      public ChannelMetadata metadata()
      Deprecated.
      Description copied from interface: Channel
      Return the ChannelMetadata of the Channel which describe the nature of the 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.
    • closeOnRead

      private void closeOnRead(ChannelPipeline pipeline)
      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 class AbstractOioChannel
    • doWrite

      protected void doWrite(ChannelOutboundBuffer in) throws Exception
      Deprecated.
      Description copied from class: AbstractChannel
      Flush the content of the given buffer to the remote peer.
      Specified by:
      doWrite in class AbstractChannel
      Throws:
      Exception
    • filterOutboundMessage

      protected final Object filterOutboundMessage(Object msg) throws Exception
      Deprecated.
      Description copied from class: AbstractChannel
      Invoked when a new message is added to a ChannelOutboundBuffer of this AbstractChannel, so that the Channel implementation converts the message to another. (e.g. heap buffer -> direct buffer)
      Overrides:
      filterOutboundMessage in class AbstractChannel
      Throws:
      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 Exception
      Deprecated.
      Read bytes from the underlying Socket.
      Parameters:
      buf - the ByteBuf 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:
      Exception - is thrown if an error occurred
    • doWriteBytes

      protected abstract void doWriteBytes(ByteBuf buf) throws Exception
      Deprecated.
      Write the data which is hold by the ByteBuf to the underlying Socket.
      Parameters:
      buf - the ByteBuf which holds the data to transfer
      Throws:
      Exception - is thrown if an error occurred
    • doWriteFileRegion

      protected abstract void doWriteFileRegion(FileRegion region) throws Exception
      Deprecated.
      Write the data which is hold by the FileRegion to the underlying Socket.
      Parameters:
      region - the FileRegion which holds the data to transfer
      Throws:
      Exception - is thrown if an error occurred