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
PathEvent
s to build the node's current world view of the overlay network.
Other handler can implement this class 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
ConstructorsModifierConstructorDescriptionprotected
protected
TopologyHandler
(Map<DrasylAddress, InetSocketAddress> superPeers, Map<DrasylAddress, InetSocketAddress> childrenPeers, Map<DrasylAddress, InetSocketAddress> peers) -
Method Summary
Modifier and TypeMethodDescriptionprotected TopologyHandler.Topology
topology
(io.netty.channel.ChannelHandlerContext ctx) void
userEventTriggered
(io.netty.channel.ChannelHandlerContext ctx, Object evt) Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
userEventTriggered
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
userEventTriggered
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
-
topology
-