Package org.drasyl.pipeline.codec
Class ApplicationMessage2ObjectHolderHandler
- java.lang.Object
-
- org.drasyl.pipeline.HandlerAdapter
-
- org.drasyl.pipeline.AddressHandlerAdapter<A>
-
- org.drasyl.pipeline.SimpleInboundHandler<ApplicationMessage,Event,CompressedPublicKey>
-
- org.drasyl.pipeline.codec.ApplicationMessage2ObjectHolderHandler
-
- All Implemented Interfaces:
Handler
public class ApplicationMessage2ObjectHolderHandler extends SimpleInboundHandler<ApplicationMessage,Event,CompressedPublicKey>
Handler that converts a givenApplicationMessage
to anObjectHolder
.
-
-
Field Summary
Fields Modifier and Type Field Description static String
APP_MSG2OBJECT_HOLDER
static ApplicationMessage2ObjectHolderHandler
INSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
matchedEventTriggered(HandlerContext ctx, Event event, CompletableFuture<Void> future)
Is called for each event of typeSimpleInboundHandler
.protected void
matchedRead(HandlerContext ctx, CompressedPublicKey sender, ApplicationMessage msg, CompletableFuture<Void> future)
Is called for each message of typeSimpleInboundHandler
.-
Methods inherited from class org.drasyl.pipeline.SimpleInboundHandler
acceptEvent, acceptInbound, eventTriggered, read
-
Methods inherited from class org.drasyl.pipeline.AddressHandlerAdapter
acceptAddress
-
Methods inherited from class org.drasyl.pipeline.HandlerAdapter
exceptionCaught, handlerAdded, handlerRemoved, write
-
-
-
-
Field Detail
-
INSTANCE
public static final ApplicationMessage2ObjectHolderHandler INSTANCE
-
APP_MSG2OBJECT_HOLDER
public static final String APP_MSG2OBJECT_HOLDER
- See Also:
- Constant Field Values
-
-
Method Detail
-
matchedEventTriggered
protected void matchedEventTriggered(HandlerContext ctx, Event event, CompletableFuture<Void> future)
Description copied from class:SimpleInboundHandler
Is called for each event of typeSimpleInboundHandler
.- Specified by:
matchedEventTriggered
in classSimpleInboundHandler<ApplicationMessage,Event,CompressedPublicKey>
- Parameters:
ctx
- handler contextevent
- the eventfuture
- the future of the message
-
matchedRead
protected void matchedRead(HandlerContext ctx, CompressedPublicKey sender, ApplicationMessage msg, CompletableFuture<Void> future)
Description copied from class:SimpleInboundHandler
Is called for each message of typeSimpleInboundHandler
.- Specified by:
matchedRead
in classSimpleInboundHandler<ApplicationMessage,Event,CompressedPublicKey>
- Parameters:
ctx
- handler contextsender
- the sender of the messagemsg
- the messagefuture
- the future of the message
-
-