Package io.quarkus.netty.runtime.virtual
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.-
Nested Class Summary
Nested classes/interfaces inherited from class io.netty.channel.AbstractChannel
io.netty.channel.AbstractChannel.AbstractUnsafe
Nested classes/interfaces inherited from interface io.netty.channel.Channel
io.netty.channel.Channel.Unsafe
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected io.netty.channel.ChannelPromise
protected static final AtomicReferenceFieldUpdater<VirtualChannel,
io.netty.util.concurrent.Future> protected io.netty.util.concurrent.Future<?>
protected VirtualAddress
protected boolean
protected SocketAddress
protected io.quarkus.netty.runtime.virtual.VirtualChannel.State
(package private) final VirtualClientConnection
protected boolean
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
VirtualChannel
(VirtualServerChannel parent, VirtualClientConnection connection) -
Method Summary
Modifier and TypeMethodDescriptionio.netty.channel.ChannelConfig
config()
protected void
protected void
doBind
(SocketAddress localAddress) protected void
doClose()
protected void
protected void
protected void
protected void
doWrite
(io.netty.channel.ChannelOutboundBuffer in) boolean
isActive()
protected boolean
isCompatible
(io.netty.channel.EventLoop loop) boolean
isOpen()
protected SocketAddress
io.netty.channel.ChannelMetadata
metadata()
protected io.netty.channel.AbstractChannel.AbstractUnsafe
parent()
protected void
protected SocketAddress
Methods inherited from class io.netty.channel.AbstractChannel
alloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, close, close, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, doShutdownOutput, equals, eventLoop, filterOutboundMessage, flush, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, maxMessagesPerWrite, newChannelPipeline, newFailedFuture, newId, newProgressivePromise, newPromise, newSucceededFuture, pipeline, read, toString, unsafe, validateFileRegion, voidPromise, write, write, writeAndFlush, writeAndFlush
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
-
Field Details
-
FINISH_READ_FUTURE_UPDATER
protected static final AtomicReferenceFieldUpdater<VirtualChannel,io.netty.util.concurrent.Future> FINISH_READ_FUTURE_UPDATER -
inboundBuffer
-
virtualConnection
-
state
protected volatile io.quarkus.netty.runtime.virtual.VirtualChannel.State state -
localAddress
-
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
-
VirtualChannel
-
-
Method Details
-
metadata
public io.netty.channel.ChannelMetadata metadata() -
config
public io.netty.channel.ChannelConfig config() -
parent
- Specified by:
parent
in interfaceio.netty.channel.Channel
- Overrides:
parent
in classio.netty.channel.AbstractChannel
-
localAddress
- Specified by:
localAddress
in interfaceio.netty.channel.Channel
- Overrides:
localAddress
in classio.netty.channel.AbstractChannel
-
remoteAddress
- Specified by:
remoteAddress
in interfaceio.netty.channel.Channel
- Overrides:
remoteAddress
in classio.netty.channel.AbstractChannel
-
isOpen
public boolean isOpen() -
isActive
public boolean isActive() -
newUnsafe
protected io.netty.channel.AbstractChannel.AbstractUnsafe newUnsafe()- Specified by:
newUnsafe
in classio.netty.channel.AbstractChannel
-
isCompatible
protected boolean isCompatible(io.netty.channel.EventLoop loop) - Specified by:
isCompatible
in classio.netty.channel.AbstractChannel
-
localAddress0
- Specified by:
localAddress0
in classio.netty.channel.AbstractChannel
-
remoteAddress0
- Specified by:
remoteAddress0
in classio.netty.channel.AbstractChannel
-
doRegister
- Overrides:
doRegister
in classio.netty.channel.AbstractChannel
- Throws:
Exception
-
doBind
- Specified by:
doBind
in classio.netty.channel.AbstractChannel
- Throws:
Exception
-
doDisconnect
- Specified by:
doDisconnect
in classio.netty.channel.AbstractChannel
- Throws:
Exception
-
doClose
- Specified by:
doClose
in classio.netty.channel.AbstractChannel
- Throws:
Exception
-
doDeregister
- Overrides:
doDeregister
in classio.netty.channel.AbstractChannel
- Throws:
Exception
-
readInbound
protected void readInbound() -
doBeginRead
- Specified by:
doBeginRead
in classio.netty.channel.AbstractChannel
- Throws:
Exception
-
doWrite
- Specified by:
doWrite
in classio.netty.channel.AbstractChannel
- Throws:
Exception
-