Interface Channel.Unsafe

All Known Subinterfaces:
AbstractNioChannel.NioUnsafe
All Known Implementing Classes:
AbstractChannel.AbstractUnsafe, AbstractEpollChannel.AbstractEpollUnsafe, AbstractEpollServerChannel.EpollServerSocketUnsafe, AbstractEpollStreamChannel.EpollStreamUnsafe, AbstractHttp2StreamChannel.Http2ChannelUnsafe, AbstractIoUringChannel.AbstractUringUnsafe, AbstractIoUringServerChannel.UringServerChannelUnsafe, AbstractIoUringStreamChannel.IoUringStreamUnsafe, AbstractKQueueChannel.AbstractKQueueUnsafe, AbstractKQueueServerChannel.KQueueServerSocketUnsafe, AbstractKQueueStreamChannel.KQueueStreamUnsafe, AbstractNioByteChannel.NioByteUnsafe, AbstractNioChannel.AbstractNioUnsafe, AbstractNioMessageChannel.NioMessageUnsafe, AbstractOioChannel.DefaultOioUnsafe, AbstractServerChannel.DefaultServerUnsafe, EmbeddedChannel.EmbeddedUnsafe, EpollDatagramChannel.EpollDatagramChannelUnsafe, EpollDomainDatagramChannel.EpollDomainDatagramChannelUnsafe, EpollDomainSocketChannel.EpollDomainUnsafe, EpollSocketChannel.EpollSocketChannelUnsafe, FailedChannel.FailedChannelUnsafe, IoUringDatagramChannel.IoUringDatagramChannelUnsafe, IoUringDomainSocketChannel.IoUringDomainSocketUnsafe, IoUringSocketChannel.IoUringSocketUnsafe, KQueueDatagramChannel.KQueueDatagramChannelUnsafe, KQueueDomainDatagramChannel.KQueueDomainDatagramChannelUnsafe, KQueueDomainSocketChannel.KQueueDomainUnsafe, LocalChannel.LocalUnsafe, LocalServerChannel.LocalServerUnsafe, NioDomainSocketChannel.NioSocketChannelUnsafe, NioSocketChannel.NioSocketChannelUnsafe
Enclosing interface:
Channel

public static interface Channel.Unsafe
Unsafe operations that should never be called from user-code. These methods are only provided to implement the actual transport, and must be invoked from an I/O thread except for the following methods:
  • Method Details

    • recvBufAllocHandle

      RecvByteBufAllocator.Handle recvBufAllocHandle()
      Return the assigned RecvByteBufAllocator.Handle which will be used to allocate ByteBuf's when receiving data.
    • localAddress

      java.net.SocketAddress localAddress()
      Return the SocketAddress to which is bound local or null if none.
    • remoteAddress

      java.net.SocketAddress remoteAddress()
      Return the SocketAddress to which is bound remote or null if none is bound yet.
    • register

      void register(EventLoop eventLoop, ChannelPromise promise)
      Register the Channel of the ChannelPromise and notify the ChannelFuture once the registration was complete.
    • bind

      void bind(java.net.SocketAddress localAddress, ChannelPromise promise)
      Bind the SocketAddress to the Channel of the ChannelPromise and notify it once its done.
    • connect

      void connect(java.net.SocketAddress remoteAddress, java.net.SocketAddress localAddress, ChannelPromise promise)
      Connect the Channel of the given ChannelFuture with the given remote SocketAddress. If a specific local SocketAddress should be used it need to be given as argument. Otherwise just pass null to it. The ChannelPromise will get notified once the connect operation was complete.
    • disconnect

      void disconnect(ChannelPromise promise)
      Disconnect the Channel of the ChannelFuture and notify the ChannelPromise once the operation was complete.
    • close

      void close(ChannelPromise promise)
      Close the Channel of the ChannelPromise and notify the ChannelPromise once the operation was complete.
    • closeForcibly

      void closeForcibly()
      Closes the Channel immediately without firing any events. Probably only useful when registration attempt failed.
    • deregister

      void deregister(ChannelPromise promise)
      Deregister the Channel of the ChannelPromise from EventLoop and notify the ChannelPromise once the operation was complete.
    • beginRead

      void beginRead()
      Schedules a read operation that fills the inbound buffer of the first ChannelInboundHandler in the ChannelPipeline. If there's already a pending read operation, this method does nothing.
    • write

      void write(java.lang.Object msg, ChannelPromise promise)
      Schedules a write operation.
    • flush

      void flush()
      Flush out all write operations scheduled via write(Object, ChannelPromise).
    • voidPromise

      ChannelPromise voidPromise()
      Return a special ChannelPromise which can be reused and passed to the operations in Channel.Unsafe. It will never be notified of a success or error and so is only a placeholder for operations that take a ChannelPromise as argument but for which you not want to get notified.
    • outboundBuffer

      ChannelOutboundBuffer outboundBuffer()
      Returns the ChannelOutboundBuffer of the Channel where the pending write requests are stored.