Package org.drasyl.monitoring
Class Monitoring
- java.lang.Object
-
- org.drasyl.pipeline.skeleton.HandlerAdapter
-
- org.drasyl.pipeline.skeleton.AddressHandlerAdapter<A>
-
- org.drasyl.pipeline.skeleton.SimpleInboundEventAwareHandler<I,E,A>
-
- org.drasyl.pipeline.skeleton.SimpleDuplexEventAwareHandler<I,Event,O,A>
-
- org.drasyl.pipeline.skeleton.SimpleDuplexHandler<Object,Object,Address>
-
- org.drasyl.monitoring.Monitoring
-
- All Implemented Interfaces:
Handler
public class Monitoring extends SimpleDuplexHandler<Object,Object,Address>
Monitors various states or events in the drasyl node.
-
-
Constructor Summary
Constructors Constructor Description Monitoring()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
matchedInbound(HandlerContext ctx, Address sender, Object msg, CompletableFuture<Void> future)
Is called for each message of typeSimpleInboundEventAwareHandler
.protected void
matchedOutbound(HandlerContext ctx, Address recipient, Object msg, CompletableFuture<Void> future)
Is called for each message of typeSimpleDuplexEventAwareHandler
.void
onEvent(HandlerContext ctx, Event event, CompletableFuture<Void> future)
Gets called if aEvent
was emitted.-
Methods inherited from class org.drasyl.pipeline.skeleton.SimpleDuplexHandler
matchedEvent
-
Methods inherited from class org.drasyl.pipeline.skeleton.SimpleDuplexEventAwareHandler
acceptOutbound, onOutbound
-
Methods inherited from class org.drasyl.pipeline.skeleton.SimpleInboundEventAwareHandler
acceptEvent, acceptInbound, onInbound
-
Methods inherited from class org.drasyl.pipeline.skeleton.AddressHandlerAdapter
acceptAddress
-
Methods inherited from class org.drasyl.pipeline.skeleton.HandlerAdapter
onAdded, onException, onRemoved
-
-
-
-
Method Detail
-
onEvent
public void onEvent(HandlerContext ctx, Event event, CompletableFuture<Void> future)
Description copied from interface:Handler
Gets called if aEvent
was emitted.
-
matchedInbound
protected void matchedInbound(HandlerContext ctx, Address sender, Object msg, CompletableFuture<Void> future)
Description copied from class:SimpleInboundEventAwareHandler
Is called for each message of typeSimpleInboundEventAwareHandler
.- Specified by:
matchedInbound
in classSimpleInboundEventAwareHandler<Object,Event,Address>
- Parameters:
ctx
- handler contextsender
- the sender of the messagemsg
- the messagefuture
- the future of the message
-
matchedOutbound
protected void matchedOutbound(HandlerContext ctx, Address recipient, Object msg, CompletableFuture<Void> future)
Description copied from class:SimpleDuplexEventAwareHandler
Is called for each message of typeSimpleDuplexEventAwareHandler
.- Specified by:
matchedOutbound
in classSimpleDuplexEventAwareHandler<Object,Event,Object,Address>
- Parameters:
ctx
- handler contextrecipient
- the recipient of the messagemsg
- the messagefuture
- a future for the message
-
-