Package io.quarkus.netty.runtime.virtual
Class VirtualServerChannel
- java.lang.Object
-
- io.netty.util.DefaultAttributeMap
-
- io.netty.channel.AbstractChannel
-
- io.netty.channel.AbstractServerChannel
-
- io.quarkus.netty.runtime.virtual.VirtualServerChannel
-
- All Implemented Interfaces:
io.netty.channel.Channel
,io.netty.channel.ChannelOutboundInvoker
,io.netty.channel.ServerChannel
,io.netty.util.AttributeMap
,Comparable<io.netty.channel.Channel>
public class VirtualServerChannel extends io.netty.channel.AbstractServerChannel
AServerChannel
for the local transport which allows in VM communication. This is a bit different than a LocalServerChannel in regular Netty as it does not require a client event loop and exposes the client inbound queue directly.
-
-
Constructor Summary
Constructors Constructor Description VirtualServerChannel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.netty.channel.ChannelConfig
config()
protected void
doBeginRead()
protected void
doBind(SocketAddress localAddress)
protected void
doClose()
protected void
doDeregister()
protected void
doRegister()
boolean
isActive()
protected boolean
isCompatible(io.netty.channel.EventLoop loop)
boolean
isOpen()
VirtualAddress
localAddress()
protected SocketAddress
localAddress0()
protected VirtualChannel
newLocalChannel(VirtualClientConnection peer)
A factory method forVirtualChannel
s.VirtualAddress
remoteAddress()
(package private) VirtualChannel
serve(VirtualClientConnection peer)
-
Methods inherited from class io.netty.channel.AbstractServerChannel
doDisconnect, doWrite, filterOutboundMessage, metadata, newUnsafe, remoteAddress0
-
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, flush, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, maxMessagesPerWrite, newChannelPipeline, newFailedFuture, newId, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, toString, unsafe, validateFileRegion, voidPromise, write, write, writeAndFlush, writeAndFlush
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.netty.channel.Channel
alloc, bytesBeforeUnwritable, bytesBeforeWritable, closeFuture, eventLoop, flush, id, isRegistered, isWritable, parent, pipeline, read, unsafe
-
Methods inherited from interface io.netty.channel.ChannelOutboundInvoker
bind, bind, close, close, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, voidPromise, write, write, writeAndFlush, writeAndFlush
-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Method Detail
-
config
public io.netty.channel.ChannelConfig config()
-
localAddress
public VirtualAddress localAddress()
- Specified by:
localAddress
in interfaceio.netty.channel.Channel
- Overrides:
localAddress
in classio.netty.channel.AbstractChannel
-
remoteAddress
public VirtualAddress remoteAddress()
- Specified by:
remoteAddress
in interfaceio.netty.channel.Channel
- Overrides:
remoteAddress
in classio.netty.channel.AbstractServerChannel
-
isOpen
public boolean isOpen()
-
isActive
public boolean isActive()
-
isCompatible
protected boolean isCompatible(io.netty.channel.EventLoop loop)
- Specified by:
isCompatible
in classio.netty.channel.AbstractChannel
-
localAddress0
protected SocketAddress localAddress0()
- Specified by:
localAddress0
in classio.netty.channel.AbstractChannel
-
doRegister
protected void doRegister() throws Exception
- Overrides:
doRegister
in classio.netty.channel.AbstractChannel
- Throws:
Exception
-
doBind
protected void doBind(SocketAddress localAddress) throws Exception
- Specified by:
doBind
in classio.netty.channel.AbstractChannel
- Throws:
Exception
-
doClose
protected void doClose() throws Exception
- Specified by:
doClose
in classio.netty.channel.AbstractChannel
- Throws:
Exception
-
doDeregister
protected void doDeregister() throws Exception
- Overrides:
doDeregister
in classio.netty.channel.AbstractChannel
- Throws:
Exception
-
doBeginRead
protected void doBeginRead() throws Exception
- Specified by:
doBeginRead
in classio.netty.channel.AbstractChannel
- Throws:
Exception
-
serve
VirtualChannel serve(VirtualClientConnection peer)
-
newLocalChannel
protected VirtualChannel newLocalChannel(VirtualClientConnection peer)
A factory method forVirtualChannel
s. Users may override it to create custom instances ofVirtualChannel
s.
-
-