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
This handler delivers outgoing messages addressed to the local node.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLoopbackMessageSinkHandler
(AtomicBoolean started, int networkId, Identity identity, PeersManager peersManager, Set<Endpoint> endpoints) -
Method Summary
Modifier and TypeMethodDescriptionprotected 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 Details
-
LOOPBACK_MESSAGE_SINK_HANDLER
- See Also:
-
-
Constructor Details
-
LoopbackMessageSinkHandler
public LoopbackMessageSinkHandler(AtomicBoolean started, int networkId, Identity identity, PeersManager peersManager, Set<Endpoint> endpoints)
-
-
Method Details
-
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
-