Package org.drasyl.channel
Class DrasylServerChannel
java.lang.Object
io.netty.util.DefaultAttributeMap
io.netty.channel.AbstractChannel
io.netty.channel.AbstractServerChannel
org.drasyl.channel.DrasylServerChannel
- All Implemented Interfaces:
io.netty.channel.Channel
,io.netty.channel.ChannelOutboundInvoker
,io.netty.channel.ServerChannel
,io.netty.util.AttributeMap
,Comparable<io.netty.channel.Channel>
,IdentityChannel
@UnstableApi
public class DrasylServerChannel
extends io.netty.channel.AbstractServerChannel
implements IdentityChannel
A virtual
ServerChannel
used for overlay network management. This
channel must be bind to an Identity
.
(Currently) only compatible with NioEventLoop
.
Inspired by LocalServerChannel
.
- See Also:
-
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
config()
protected void
protected void
doBind
(SocketAddress identity) protected void
doClose()
protected void
void
flushMeIfUdpChannelBecomeWritable
(io.netty.channel.Channel channel) getChannel
(DrasylAddress peer) identity()
boolean
isActive()
protected boolean
isCompatible
(io.netty.channel.EventLoop loop) boolean
isOpen()
protected DrasylAddress
protected DrasylChannel
io.netty.channel.ChannelFuture
serve
(DrasylAddress peer) io.netty.channel.socket.DatagramChannel
Methods inherited from class io.netty.channel.AbstractServerChannel
doDisconnect, doWrite, filterOutboundMessage, metadata, newUnsafe, remoteAddress, 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, doDeregister, doShutdownOutput, equals, eventLoop, flush, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, localAddress, maxMessagesPerWrite, newChannelPipeline, newFailedFuture, newId, newProgressivePromise, newPromise, newSucceededFuture, parent, 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
Methods inherited from interface io.netty.channel.Channel
alloc, bytesBeforeUnwritable, bytesBeforeWritable, closeFuture, eventLoop, flush, id, isRegistered, isWritable, localAddress, 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
-
Constructor Details
-
DrasylServerChannel
public DrasylServerChannel()
-
-
Method Details
-
isCompatible
protected boolean isCompatible(io.netty.channel.EventLoop loop) - Specified by:
isCompatible
in classio.netty.channel.AbstractChannel
-
identity
- Specified by:
identity
in interfaceIdentityChannel
-
localAddress0
- Specified by:
localAddress0
in classio.netty.channel.AbstractChannel
-
doBind
- Specified by:
doBind
in classio.netty.channel.AbstractChannel
-
doRegister
- Overrides:
doRegister
in classio.netty.channel.AbstractChannel
- Throws:
Exception
-
doClose
protected void doClose()- Specified by:
doClose
in classio.netty.channel.AbstractChannel
-
doBeginRead
protected void doBeginRead()- Specified by:
doBeginRead
in classio.netty.channel.AbstractChannel
-
config
- Specified by:
config
in interfaceio.netty.channel.Channel
-
isOpen
public boolean isOpen()- Specified by:
isOpen
in interfaceio.netty.channel.Channel
-
isActive
public boolean isActive()- Specified by:
isActive
in interfaceio.netty.channel.Channel
-
newDrasylChannel
-
getChannels
-
getChannel
-
serve
-
udpChannel
public io.netty.channel.socket.DatagramChannel udpChannel() -
flushMeIfUdpChannelBecomeWritable
public void flushMeIfUdpChannelBecomeWritable(io.netty.channel.Channel channel) -
cachedTimeMillis
public long cachedTimeMillis()
-