Package org.drasyl.remote.handler
Class ByteBuf2MessageHandler
- java.lang.Object
-
- org.drasyl.pipeline.skeleton.HandlerAdapter
-
- org.drasyl.pipeline.skeleton.AddressHandlerAdapter<A>
-
- org.drasyl.pipeline.skeleton.SimpleInboundEventAwareHandler<I,Event,A>
-
- org.drasyl.pipeline.skeleton.SimpleInboundHandler<AddressedByteBuf,Address>
-
- org.drasyl.remote.handler.ByteBuf2MessageHandler
-
- All Implemented Interfaces:
Handler
public final class ByteBuf2MessageHandler extends SimpleInboundHandler<AddressedByteBuf,Address>
Handler that converts a givenByteBuf
to aAddressedIntermediateEnvelope
.
-
-
Field Summary
Fields Modifier and Type Field Description static String
BYTE_BUF_2_MESSAGE_HANDLER
static ByteBuf2MessageHandler
INSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
matchedRead(HandlerContext ctx, Address sender, AddressedByteBuf addressedByteBuf, CompletableFuture<Void> future)
Is called for each message of typeSimpleInboundEventAwareHandler
.-
Methods inherited from class org.drasyl.pipeline.skeleton.SimpleInboundHandler
eventTriggered, matchedEventTriggered
-
Methods inherited from class org.drasyl.pipeline.skeleton.SimpleInboundEventAwareHandler
acceptEvent, acceptInbound, read
-
Methods inherited from class org.drasyl.pipeline.skeleton.AddressHandlerAdapter
acceptAddress
-
Methods inherited from class org.drasyl.pipeline.skeleton.HandlerAdapter
exceptionCaught, handlerAdded, handlerRemoved, write
-
-
-
-
Field Detail
-
INSTANCE
public static final ByteBuf2MessageHandler INSTANCE
-
BYTE_BUF_2_MESSAGE_HANDLER
public static final String BYTE_BUF_2_MESSAGE_HANDLER
- See Also:
- Constant Field Values
-
-
Method Detail
-
matchedRead
protected void matchedRead(HandlerContext ctx, Address sender, AddressedByteBuf addressedByteBuf, CompletableFuture<Void> future)
Description copied from class:SimpleInboundEventAwareHandler
Is called for each message of typeSimpleInboundEventAwareHandler
.- Specified by:
matchedRead
in classSimpleInboundEventAwareHandler<AddressedByteBuf,Event,Address>
- Parameters:
ctx
- handler contextsender
- the sender of the messageaddressedByteBuf
- the messagefuture
- the future of the message
-
-