Class VirtualChannel

java.lang.Object
io.netty.util.DefaultAttributeMap
io.netty.channel.AbstractChannel
io.quarkus.netty.runtime.virtual.VirtualChannel
All Implemented Interfaces:
io.netty.channel.Channel, io.netty.channel.ChannelOutboundInvoker, io.netty.util.AttributeMap, Comparable<io.netty.channel.Channel>

public class VirtualChannel extends io.netty.channel.AbstractChannel
A Channel for the local transport. This is a bit different from a LocalChannel in regular Netty as it does not require a client event loop and exposes the client inbound queue directly. The queue exposed is a blocking queue so that local virtual clients can block on this queue and obtain messages directly for processing.
  • Field Details

    • FINISH_READ_FUTURE_UPDATER

      protected static final AtomicReferenceFieldUpdater<VirtualChannel,io.netty.util.concurrent.Future> FINISH_READ_FUTURE_UPDATER
    • inboundBuffer

      final Queue<Object> inboundBuffer
    • virtualConnection

      final VirtualClientConnection virtualConnection
    • state

      protected volatile io.quarkus.netty.runtime.virtual.VirtualChannel.State state
    • localAddress

      protected volatile VirtualAddress localAddress
    • remoteAddress

      protected volatile SocketAddress remoteAddress
    • connectPromise

      protected volatile io.netty.channel.ChannelPromise connectPromise
    • readInProgress

      protected volatile boolean readInProgress
    • writeInProgress

      protected volatile boolean writeInProgress
    • finishReadFuture

      protected volatile io.netty.util.concurrent.Future<?> finishReadFuture
  • Constructor Details

  • Method Details

    • metadata

      public io.netty.channel.ChannelMetadata metadata()
    • config

      public io.netty.channel.ChannelConfig config()
    • parent

      public VirtualServerChannel parent()
      Specified by:
      parent in interface io.netty.channel.Channel
      Overrides:
      parent in class io.netty.channel.AbstractChannel
    • localAddress

      public VirtualAddress localAddress()
      Specified by:
      localAddress in interface io.netty.channel.Channel
      Overrides:
      localAddress in class io.netty.channel.AbstractChannel
    • remoteAddress

      public SocketAddress remoteAddress()
      Specified by:
      remoteAddress in interface io.netty.channel.Channel
      Overrides:
      remoteAddress in class io.netty.channel.AbstractChannel
    • isOpen

      public boolean isOpen()
    • isActive

      public boolean isActive()
    • newUnsafe

      protected io.netty.channel.AbstractChannel.AbstractUnsafe newUnsafe()
      Specified by:
      newUnsafe in class io.netty.channel.AbstractChannel
    • isCompatible

      protected boolean isCompatible(io.netty.channel.EventLoop loop)
      Specified by:
      isCompatible in class io.netty.channel.AbstractChannel
    • localAddress0

      protected SocketAddress localAddress0()
      Specified by:
      localAddress0 in class io.netty.channel.AbstractChannel
    • remoteAddress0

      protected SocketAddress remoteAddress0()
      Specified by:
      remoteAddress0 in class io.netty.channel.AbstractChannel
    • doRegister

      protected void doRegister() throws Exception
      Overrides:
      doRegister in class io.netty.channel.AbstractChannel
      Throws:
      Exception
    • doBind

      protected void doBind(SocketAddress localAddress) throws Exception
      Specified by:
      doBind in class io.netty.channel.AbstractChannel
      Throws:
      Exception
    • doDisconnect

      protected void doDisconnect() throws Exception
      Specified by:
      doDisconnect in class io.netty.channel.AbstractChannel
      Throws:
      Exception
    • doClose

      protected void doClose() throws Exception
      Specified by:
      doClose in class io.netty.channel.AbstractChannel
      Throws:
      Exception
    • doDeregister

      protected void doDeregister() throws Exception
      Overrides:
      doDeregister in class io.netty.channel.AbstractChannel
      Throws:
      Exception
    • readInbound

      protected void readInbound()
    • doBeginRead

      protected void doBeginRead() throws Exception
      Specified by:
      doBeginRead in class io.netty.channel.AbstractChannel
      Throws:
      Exception
    • doWrite

      protected void doWrite(io.netty.channel.ChannelOutboundBuffer in) throws Exception
      Specified by:
      doWrite in class io.netty.channel.AbstractChannel
      Throws:
      Exception