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 givenObjectHolder
to anApplicationMessage
.
-
-
Field Summary
Fields Modifier and Type Field Description static String
OBJECT_HOLDER2APP_MSG
-
Constructor Summary
Constructors Constructor Description ObjectHolder2ApplicationMessageHandler(int networkId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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 Detail
-
OBJECT_HOLDER2APP_MSG
public static final String OBJECT_HOLDER2APP_MSG
- See Also:
- Constant Field Values
-
-
Method Detail
-
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
-
-