Class DirectConnectionMessageSinkHandler
java.lang.Object
org.drasyl.pipeline.HandlerAdapter
org.drasyl.pipeline.AddressHandlerAdapter<A>
org.drasyl.pipeline.SimpleOutboundHandler<Message,CompressedPublicKey>
org.drasyl.peer.connection.pipeline.DirectConnectionMessageSinkHandler
- All Implemented Interfaces:
Handler
public class DirectConnectionMessageSinkHandler
extends SimpleOutboundHandler<Message,CompressedPublicKey>
This handler tries to send outgoing messages via TCP-based direct connection to another peers.
-
Field Summary
Fields -
Constructor Summary
Constructors -
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
-
DIRECT_CONNECTION_MESSAGE_SINK_HANDLER
- See Also:
-
-
Constructor Details
-
DirectConnectionMessageSinkHandler
-
-
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
-