Class LoopbackMessageSinkHandler
- java.lang.Object
-
- org.drasyl.pipeline.HandlerAdapter
-
- org.drasyl.pipeline.AddressHandlerAdapter<A>
-
- org.drasyl.pipeline.SimpleOutboundHandler<Message,CompressedPublicKey>
-
- org.drasyl.peer.connection.pipeline.LoopbackMessageSinkHandler
-
- All Implemented Interfaces:
Handler
public class LoopbackMessageSinkHandler extends SimpleOutboundHandler<Message,CompressedPublicKey>
This handler delivers outgoing messages addressed to the local node.
-
-
Field Summary
Fields Modifier and Type Field Description static String
LOOPBACK_MESSAGE_SINK_HANDLER
-
Constructor Summary
Constructors Constructor Description LoopbackMessageSinkHandler(AtomicBoolean started, int networkId, Identity identity, PeersManager peersManager, Set<Endpoint> endpoints)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
matchedWrite(HandlerContext ctx, CompressedPublicKey recipient, Message msg, CompletableFuture<Void> future)
Is called for each message of typeSimpleOutboundHandler
.-
Methods inherited from class org.drasyl.pipeline.SimpleOutboundHandler
acceptOutbound, write
-
Methods inherited from class org.drasyl.pipeline.AddressHandlerAdapter
acceptAddress
-
Methods inherited from class org.drasyl.pipeline.HandlerAdapter
eventTriggered, exceptionCaught, handlerAdded, handlerRemoved, read
-
-
-
-
Field Detail
-
LOOPBACK_MESSAGE_SINK_HANDLER
public static final String LOOPBACK_MESSAGE_SINK_HANDLER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LoopbackMessageSinkHandler
public LoopbackMessageSinkHandler(AtomicBoolean started, int networkId, Identity identity, PeersManager peersManager, Set<Endpoint> endpoints)
-
-
Method Detail
-
matchedWrite
protected void matchedWrite(HandlerContext ctx, CompressedPublicKey recipient, Message msg, CompletableFuture<Void> future)
Description copied from class:SimpleOutboundHandler
Is called for each message of typeSimpleOutboundHandler
.- Specified by:
matchedWrite
in classSimpleOutboundHandler<Message,CompressedPublicKey>
- Parameters:
ctx
- handler contextrecipient
- the recipient of the messagemsg
- the messagefuture
- a future for the message
-
-