Package org.drasyl.pipeline.codec
Class ObjectHolder2ApplicationMessageHandler
java.lang.Object
org.drasyl.pipeline.HandlerAdapter
org.drasyl.pipeline.AddressHandlerAdapter<A>
org.drasyl.pipeline.SimpleOutboundHandler<ObjectHolder,CompressedPublicKey>
org.drasyl.pipeline.codec.ObjectHolder2ApplicationMessageHandler
- All Implemented Interfaces:
Handler
public class ObjectHolder2ApplicationMessageHandler
extends SimpleOutboundHandler<ObjectHolder,CompressedPublicKey>
Handler that convert a given
ObjectHolder
to an ApplicationMessage
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
matchedWrite
(HandlerContext ctx, CompressedPublicKey recipient, ObjectHolder 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
-
OBJECT_HOLDER2APP_MSG
- See Also:
-
-
Constructor Details
-
ObjectHolder2ApplicationMessageHandler
public ObjectHolder2ApplicationMessageHandler(int networkId)
-
-
Method Details
-
matchedWrite
protected void matchedWrite(HandlerContext ctx, CompressedPublicKey recipient, ObjectHolder msg, CompletableFuture<Void> future) Description copied from class:SimpleOutboundHandler
Is called for each message of typeSimpleOutboundHandler
.- Specified by:
matchedWrite
in classSimpleOutboundHandler<ObjectHolder,
CompressedPublicKey> - Parameters:
ctx
- handler contextrecipient
- the recipient of the messagemsg
- the messagefuture
- a future for the message
-