Package org.drasyl.handler.monitoring
Class TopologyHandler
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
org.drasyl.handler.monitoring.TopologyHandler
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
- Direct Known Subclasses:
TelemetryHandler
public abstract class TopologyHandler
extends io.netty.channel.ChannelInboundHandlerAdapter
Uses emitted
PathEvents to build the node's current world view of the overlay network.
Other handler can implement this call and retrieve the topology by calling topology(ChannelHandlerContext).-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map<DrasylAddress,InetSocketAddress> protected final Map<DrasylAddress,InetSocketAddress> protected final Map<DrasylAddress,InetSocketAddress> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedTopologyHandler(Map<DrasylAddress, InetSocketAddress> superPeers, Map<DrasylAddress, InetSocketAddress> childrenPeers, Map<DrasylAddress, InetSocketAddress> peers) -
Method Summary
Modifier and TypeMethodDescriptionprotected TopologyHandler.Topologytopology(io.netty.channel.ChannelHandlerContext ctx) voiduserEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt) Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRead, 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
-
Field Details
-
superPeers
-
childrenPeers
-
peers
-
-
Constructor Details
-
TopologyHandler
protected TopologyHandler(Map<DrasylAddress, InetSocketAddress> superPeers, Map<DrasylAddress, InetSocketAddress> childrenPeers, Map<DrasylAddress, InetSocketAddress> peers) -
TopologyHandler
protected TopologyHandler()
-
-
Method Details
-
userEventTriggered
public void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt) throws Exception - Specified by:
userEventTriggeredin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
userEventTriggeredin classio.netty.channel.ChannelInboundHandlerAdapter- Throws:
Exception
-
topology
-