All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.smallrye.reactive.messaging.OutgoingMessageMetadata Maven / Gradle / Ivy

There is a newer version: 4.27.0
Show newest version
package io.smallrye.reactive.messaging;

import org.eclipse.microprofile.reactive.messaging.Message;

/**
 * Metadata injected for holding the result of outgoing connector's transmission operation
 * 

* Connector implementations are responsible for searching for this metadata on the outgoing message * and setting the transmission result on that metadata object. *

* Implementations of {@link OutgoingInterceptor} can access the result * on {@link OutgoingInterceptor#onMessageAck(Message)} callback. * * @param type of the transmission result */ public class OutgoingMessageMetadata { private T result; public static void setResultOnMessage(Message message, Object result) { message.getMetadata(OutgoingMessageMetadata.class).ifPresent(m -> m.setResult(result)); } public void setResult(T result) { this.result = result; } public T getResult() { return result; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy