Package org.drasyl.remote.handler
Class Message2ByteBufHandler
- java.lang.Object
-
- org.drasyl.pipeline.skeleton.HandlerAdapter
-
- org.drasyl.pipeline.skeleton.AddressHandlerAdapter<A>
-
- org.drasyl.pipeline.skeleton.SimpleOutboundHandler<AddressedIntermediateEnvelope<com.google.protobuf.MessageLite>,Address>
-
- org.drasyl.remote.handler.Message2ByteBufHandler
-
- All Implemented Interfaces:
Handler
public final class Message2ByteBufHandler extends SimpleOutboundHandler<AddressedIntermediateEnvelope<com.google.protobuf.MessageLite>,Address>
Handler that converts a givenAddressedIntermediateEnvelope
to aByteBuf
.
-
-
Field Summary
Fields Modifier and Type Field Description static Message2ByteBufHandler
INSTANCE
static String
MESSAGE_2_BYTE_BUF_HANDLER
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
matchedWrite(HandlerContext ctx, Address recipient, AddressedIntermediateEnvelope<com.google.protobuf.MessageLite> msg, CompletableFuture<Void> future)
Is called for each message of typeSimpleOutboundHandler
.-
Methods inherited from class org.drasyl.pipeline.skeleton.SimpleOutboundHandler
acceptOutbound, write
-
Methods inherited from class org.drasyl.pipeline.skeleton.AddressHandlerAdapter
acceptAddress
-
Methods inherited from class org.drasyl.pipeline.skeleton.HandlerAdapter
eventTriggered, exceptionCaught, handlerAdded, handlerRemoved, read
-
-
-
-
Field Detail
-
INSTANCE
public static final Message2ByteBufHandler INSTANCE
-
MESSAGE_2_BYTE_BUF_HANDLER
public static final String MESSAGE_2_BYTE_BUF_HANDLER
- See Also:
- Constant Field Values
-
-
Method Detail
-
matchedWrite
protected void matchedWrite(HandlerContext ctx, Address recipient, AddressedIntermediateEnvelope<com.google.protobuf.MessageLite> msg, CompletableFuture<Void> future)
Description copied from class:SimpleOutboundHandler
Is called for each message of typeSimpleOutboundHandler
.- Specified by:
matchedWrite
in classSimpleOutboundHandler<AddressedIntermediateEnvelope<com.google.protobuf.MessageLite>,Address>
- Parameters:
ctx
- handler contextrecipient
- the recipient of the messagemsg
- the messagefuture
- a future for the message
-
-