Class TraversingInternetDiscoveryChildrenHandler
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelDuplexHandler
org.drasyl.handler.remote.internet.InternetDiscoveryChildrenHandler
org.drasyl.handler.remote.internet.TraversingInternetDiscoveryChildrenHandler
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler,io.netty.channel.ChannelOutboundHandler
Extends
InternetDiscoveryChildrenHandler by performing a rendezvous initiated by one of
our super peers.-
Nested Class Summary
Nested classes/interfaces inherited from class org.drasyl.handler.remote.internet.InternetDiscoveryChildrenHandler
InternetDiscoveryChildrenHandler.SuperPeerNested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Field Summary
Fields inherited from class org.drasyl.handler.remote.internet.InternetDiscoveryChildrenHandler
bindAddress, currentTime, maxTimeOffsetMillis, myNetworkId, myProofOfWork, myPublicKey, pathEventFilter, pingTimeoutMillis, superPeers -
Constructor Summary
ConstructorsConstructorDescriptionTraversingInternetDiscoveryChildrenHandler(int myNetworkId, IdentityPublicKey myPublicKey, IdentitySecretKey mySecretKey, ProofOfWork myProofOfWork, long initialPingDelayMillis, long pingIntervalMillis, long pingTimeoutMillis, long maxTimeOffsetMillis, Map<IdentityPublicKey, InetSocketAddress> superPeerAddresses, long pingCommunicationTimeoutMillis, long maxPeers) -
Method Summary
Modifier and TypeMethodDescriptionvoidchannelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg) protected Set<InetSocketAddress>voidwrite(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise) Methods inherited from class org.drasyl.handler.remote.internet.InternetDiscoveryChildrenHandler
channelActive, channelInactive, isUnexpectedMessage, userEventTriggered, writeHelloMessageMethods inherited from class io.netty.channel.ChannelDuplexHandler
bind, close, connect, deregister, disconnect, flush, readMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaughtMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
Constructor Details
-
TraversingInternetDiscoveryChildrenHandler
public TraversingInternetDiscoveryChildrenHandler(int myNetworkId, IdentityPublicKey myPublicKey, IdentitySecretKey mySecretKey, ProofOfWork myProofOfWork, long initialPingDelayMillis, long pingIntervalMillis, long pingTimeoutMillis, long maxTimeOffsetMillis, Map<IdentityPublicKey, InetSocketAddress> superPeerAddresses, long pingCommunicationTimeoutMillis, long maxPeers) - Parameters:
myNetworkId- the network we belong tomyPublicKey- own public keymySecretKey- own secret keymyProofOfWork- own proof of workinitialPingDelayMillis- time in millis afterInternetDiscoveryChildrenHandler.channelActive(ChannelHandlerContext)has been fired, we start to ping super peerspingIntervalMillis- interval in millis between a pingpingTimeoutMillis- time in millis without ping response before a peer is assumed as unreachablemaxTimeOffsetMillis- time millis offset of received messages' timestamp before discarding themsuperPeerAddresses- inet addresses and public keys of super peerspingCommunicationTimeoutMillis- time in millis a traversed connection to a peer will be discarded without application trafficmaxPeers- maximum number of peers to which a traversed connection should be maintained at the same time
-
-
Method Details
-
channelRead
- Specified by:
channelReadin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelReadin classInternetDiscoveryChildrenHandler
-
write
public void write(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise) - Specified by:
writein interfaceio.netty.channel.ChannelOutboundHandler- Overrides:
writein classInternetDiscoveryChildrenHandler
-
getPrivateAddresses
- Overrides:
getPrivateAddressesin classInternetDiscoveryChildrenHandler
-