Package org.drasyl.channel.rs
Class RustDrasylServerChannel
java.lang.Object
io.netty.util.DefaultAttributeMap
io.netty.channel.AbstractChannel
io.netty.channel.AbstractServerChannel
org.drasyl.channel.rs.RustDrasylServerChannel
- All Implemented Interfaces:
io.netty.channel.Channel,io.netty.channel.ChannelOutboundInvoker,io.netty.channel.ServerChannel,io.netty.util.AttributeMap,Comparable<io.netty.channel.Channel>,DrasylServerChannel,IdentityChannel
@UnstableApi
public class RustDrasylServerChannel
extends io.netty.channel.AbstractServerChannel
implements DrasylServerChannel
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:
-
JavaDrasylChannel
-
Nested Class Summary
Nested classes/interfaces inherited from class io.netty.channel.AbstractChannel
io.netty.channel.AbstractChannel.AbstractUnsafeNested classes/interfaces inherited from interface io.netty.channel.Channel
io.netty.channel.Channel.Unsafe -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconfig()protected voidprotected voiddoBind(SocketAddress identity) protected voiddoClose()protected voidgetChannel(DrasylAddress peer) intbooleanidentity()booleanisActive()protected booleanisCompatible(io.netty.channel.EventLoop loop) booleanisOpen()protected DrasylAddressprotected RustDrasylChannelio.netty.channel.ChannelFutureserve(DrasylAddress peer) Methods inherited from class io.netty.channel.AbstractServerChannel
doDisconnect, doWrite, filterOutboundMessage, metadata, newUnsafe, remoteAddress, remoteAddress0Methods 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, writeAndFlushMethods inherited from class io.netty.util.DefaultAttributeMap
attr, hasAttrMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.netty.util.AttributeMap
attr, hasAttrMethods inherited from interface io.netty.channel.Channel
alloc, bytesBeforeUnwritable, bytesBeforeWritable, closeFuture, eventLoop, flush, id, isRegistered, isWritable, localAddress, metadata, parent, pipeline, read, remoteAddress, unsafeMethods 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, writeAndFlushMethods inherited from interface java.lang.Comparable
compareTo
-
Field Details
-
TIMEOUT_SENDER
public static final byte[] TIMEOUT_SENDER -
bind
public long bind
-
-
Constructor Details
-
RustDrasylServerChannel
public RustDrasylServerChannel()
-
-
Method Details
-
isCompatible
protected boolean isCompatible(io.netty.channel.EventLoop loop) - Specified by:
isCompatiblein classio.netty.channel.AbstractChannel
-
identity
- Specified by:
identityin interfaceIdentityChannel
-
localAddress0
- Specified by:
localAddress0in classio.netty.channel.AbstractChannel
-
doBind
- Specified by:
doBindin classio.netty.channel.AbstractChannel
-
doRegister
- Overrides:
doRegisterin classio.netty.channel.AbstractChannel- Throws:
Exception
-
doClose
protected void doClose()- Specified by:
doClosein classio.netty.channel.AbstractChannel
-
doBeginRead
protected void doBeginRead()- Specified by:
doBeginReadin classio.netty.channel.AbstractChannel
-
config
- Specified by:
configin interfaceio.netty.channel.Channel- Specified by:
configin interfaceDrasylServerChannel
-
isOpen
public boolean isOpen()- Specified by:
isOpenin interfaceio.netty.channel.Channel
-
isActive
public boolean isActive()- Specified by:
isActivein interfaceio.netty.channel.Channel
-
newDrasylChannel
-
getChannels
- Specified by:
getChannelsin interfaceDrasylServerChannel
-
getChannel
- Specified by:
getChannelin interfaceDrasylServerChannel
-
serve
- Specified by:
servein interfaceDrasylServerChannel
-
getUdpPort
public int getUdpPort() -
hasReachableSuperPeer
public boolean hasReachableSuperPeer()
-