Class OioSocketChannel

All Implemented Interfaces:
Channel, ChannelOutboundInvoker, DuplexChannel, SocketChannel, AttributeMap, java.lang.Comparable<Channel>

@Deprecated public class OioSocketChannel extends OioByteStreamChannel implements SocketChannel
Deprecated.
use NIO / EPOLL / KQUEUE transport.
A SocketChannel which is using Old-Blocking-IO
  • Field Details

    • logger

      private static final InternalLogger logger
      Deprecated.
    • socket

      private final java.net.Socket socket
      Deprecated.
    • config

      private final OioSocketChannelConfig config
      Deprecated.
  • Constructor Details

    • OioSocketChannel

      public OioSocketChannel()
      Deprecated.
      Create a new instance with an new Socket
    • OioSocketChannel

      public OioSocketChannel(java.net.Socket socket)
      Deprecated.
      Create a new instance from the given Socket
      Parameters:
      socket - the Socket which is used by this instance
    • OioSocketChannel

      public OioSocketChannel(Channel parent, java.net.Socket socket)
      Deprecated.
      Create a new instance from the given Socket
      Parameters:
      parent - the parent Channel which was used to create this instance. This can be null if the invalid input: '{@link /*missing*/}' has no parent as it was created by your self.
      socket - the Socket which is used by this instance
  • Method Details

    • parent

      public ServerSocketChannel parent()
      Deprecated.
      Description copied from interface: Channel
      Returns the parent of this channel.
      Specified by:
      parent in interface Channel
      Specified by:
      parent in interface SocketChannel
      Overrides:
      parent in class AbstractChannel
      Returns:
      the parent channel. null if this channel does not have a parent channel.
    • config

      public OioSocketChannelConfig config()
      Deprecated.
      Description copied from interface: Channel
      Returns the configuration of this channel.
      Specified by:
      config in interface Channel
      Specified by:
      config in interface SocketChannel
    • isOpen

      public boolean isOpen()
      Deprecated.
      Description copied from interface: Channel
      Returns true if the Channel is open and may get active later
      Specified by:
      isOpen in interface Channel
    • isActive

      public boolean isActive()
      Deprecated.
      Description copied from interface: Channel
      Return true if the Channel is active and so connected.
      Specified by:
      isActive in interface Channel
      Overrides:
      isActive in class OioByteStreamChannel
    • isOutputShutdown

      public boolean isOutputShutdown()
      Deprecated.
      Specified by:
      isOutputShutdown in interface DuplexChannel
      See Also:
      • Socket.isOutputShutdown()
    • isInputShutdown

      public boolean isInputShutdown()
      Deprecated.
      Description copied from class: AbstractOioByteChannel
      Determine if the input side of this channel is shutdown.
      Specified by:
      isInputShutdown in interface DuplexChannel
      Specified by:
      isInputShutdown in class AbstractOioByteChannel
      Returns:
      true if the input side of this channel is shutdown.
    • isShutdown

      public boolean isShutdown()
      Deprecated.
      Description copied from interface: DuplexChannel
      Determine if both the input and output of this channel have been shutdown.
      Specified by:
      isShutdown in interface DuplexChannel
    • doShutdownOutput

      protected final void doShutdownOutput() throws java.lang.Exception
      Deprecated.
      Description copied from class: AbstractChannel
      Called when conditions justify shutting down the output portion of the channel. This may happen if a write operation throws an exception.
      Overrides:
      doShutdownOutput in class AbstractChannel
      Throws:
      java.lang.Exception
    • shutdownOutput

      public ChannelFuture shutdownOutput()
      Deprecated.
      Specified by:
      shutdownOutput in interface DuplexChannel
      See Also:
      • Socket.shutdownOutput()
    • shutdownInput

      public ChannelFuture shutdownInput()
      Deprecated.
      Description copied from class: AbstractOioByteChannel
      Shutdown the input side of this channel.
      Specified by:
      shutdownInput in interface DuplexChannel
      Specified by:
      shutdownInput in class AbstractOioByteChannel
      Returns:
      A channel future that will complete when the shutdown is complete.
      See Also:
      • Socket.shutdownInput()
    • shutdown

      public ChannelFuture shutdown()
      Deprecated.
      Description copied from interface: DuplexChannel
      Will shutdown the input and output sides of this channel.
      Specified by:
      shutdown in interface DuplexChannel
      Returns:
      will be completed when both shutdown operations complete.
    • doReadBytes

      protected int doReadBytes(ByteBuf buf) throws java.lang.Exception
      Deprecated.
      Description copied from class: AbstractOioByteChannel
      Read bytes from the underlying Socket.
      Overrides:
      doReadBytes in class OioByteStreamChannel
      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:
      java.lang.Exception - is thrown if an error occurred
    • shutdownOutput

      public ChannelFuture shutdownOutput(ChannelPromise promise)
      Deprecated.
      Description copied from interface: DuplexChannel
      Will shutdown the output and notify ChannelPromise.
      Specified by:
      shutdownOutput in interface DuplexChannel
      See Also:
      • Socket.shutdownOutput()
    • shutdownOutput0

      private void shutdownOutput0(ChannelPromise promise)
      Deprecated.
    • shutdownOutput0

      private void shutdownOutput0() throws java.io.IOException
      Deprecated.
      Throws:
      java.io.IOException
    • shutdownInput

      public ChannelFuture shutdownInput(ChannelPromise promise)
      Deprecated.
      Description copied from interface: DuplexChannel
      Will shutdown the input and notify ChannelPromise.
      Specified by:
      shutdownInput in interface DuplexChannel
      See Also:
      • Socket.shutdownInput()
    • shutdownInput0

      private void shutdownInput0(ChannelPromise promise)
      Deprecated.
    • shutdown

      public ChannelFuture shutdown(ChannelPromise promise)
      Deprecated.
      Description copied from interface: DuplexChannel
      Will shutdown the input and output sides of this channel.
      Specified by:
      shutdown in interface DuplexChannel
      Parameters:
      promise - will be completed when both shutdown operations complete.
      Returns:
      will be completed when both shutdown operations complete.
    • shutdownOutputDone

      private void shutdownOutputDone(ChannelFuture shutdownOutputFuture, ChannelPromise promise)
      Deprecated.
    • shutdownDone

      private static void shutdownDone(ChannelFuture shutdownOutputFuture, ChannelFuture shutdownInputFuture, ChannelPromise promise)
      Deprecated.
    • localAddress

      public java.net.InetSocketAddress localAddress()
      Deprecated.
      Description copied from interface: Channel
      Returns the local address where this channel is bound to. The returned SocketAddress is supposed to be down-cast into more concrete type such as InetSocketAddress to retrieve the detailed information.
      Specified by:
      localAddress in interface Channel
      Specified by:
      localAddress in interface SocketChannel
      Overrides:
      localAddress in class AbstractChannel
      Returns:
      the local address of this channel. null if this channel is not bound.
    • remoteAddress

      public java.net.InetSocketAddress remoteAddress()
      Deprecated.
      Description copied from interface: Channel
      Returns the remote address where this channel is connected to. The returned SocketAddress is supposed to be down-cast into more concrete type such as InetSocketAddress to retrieve the detailed information.
      Specified by:
      remoteAddress in interface Channel
      Specified by:
      remoteAddress in interface SocketChannel
      Overrides:
      remoteAddress in class AbstractChannel
      Returns:
      the remote address of this channel. null if this channel is not connected. If this channel is not connected but it can receive messages from arbitrary remote addresses (e.g. DatagramChannel, use DefaultAddressedEnvelope.recipient() to determine the origination of the received message as this method will return null.
    • localAddress0

      protected java.net.SocketAddress localAddress0()
      Deprecated.
      Description copied from class: AbstractChannel
      Returns the SocketAddress which is bound locally.
      Specified by:
      localAddress0 in class AbstractChannel
    • remoteAddress0

      protected java.net.SocketAddress remoteAddress0()
      Deprecated.
      Description copied from class: AbstractChannel
      Return the SocketAddress which the Channel is connected to.
      Specified by:
      remoteAddress0 in class AbstractChannel
    • doBind

      protected void doBind(java.net.SocketAddress localAddress) throws java.lang.Exception
      Deprecated.
      Description copied from class: AbstractChannel
      Bind the Channel to the SocketAddress
      Specified by:
      doBind in class AbstractChannel
      Throws:
      java.lang.Exception
    • doConnect

      protected void doConnect(java.net.SocketAddress remoteAddress, java.net.SocketAddress localAddress) throws java.lang.Exception
      Deprecated.
      Description copied from class: AbstractOioChannel
      Connect to the remote peer using the given localAddress if one is specified or null otherwise.
      Specified by:
      doConnect in class AbstractOioChannel
      Throws:
      java.lang.Exception
    • doDisconnect

      protected void doDisconnect() throws java.lang.Exception
      Deprecated.
      Description copied from class: AbstractChannel
      Disconnect this Channel from its remote peer
      Specified by:
      doDisconnect in class AbstractChannel
      Throws:
      java.lang.Exception
    • doClose

      protected void doClose() throws java.lang.Exception
      Deprecated.
      Description copied from class: AbstractChannel
      Close the Channel
      Overrides:
      doClose in class OioByteStreamChannel
      Throws:
      java.lang.Exception
    • checkInputShutdown

      protected boolean checkInputShutdown()
      Deprecated.
    • setReadPending

      @Deprecated protected void setReadPending(boolean readPending)
      Deprecated.
      Overrides:
      setReadPending in class AbstractOioChannel
    • clearReadPending0

      final void clearReadPending0()
      Deprecated.