-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface SendingContextConsumerCallback before sending a message.- Since:
- 1.11.0
- See Also:
RMQConnectionFactory.setSendingContextConsumer(SendingContextConsumer),SendingContext
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaccept(SendingContext sendingContext)Called before sending a message.default SendingContextConsumerandThen(SendingContextConsumer after)Same semantics asConsumer.andThen(Consumer).
-
-
-
Method Detail
-
accept
void accept(SendingContext sendingContext) throws jakarta.jms.JMSException
Called before sending a message.Can be used to customize the message or the destination before the message is actually sent.
- Parameters:
sendingContext-- Throws:
jakarta.jms.JMSException
-
andThen
default SendingContextConsumer andThen(SendingContextConsumer after)
Same semantics asConsumer.andThen(Consumer).- Parameters:
after- the operation to perform after this operation- Returns:
- a composed
SendingContextConsumerthat performs in sequence this operation followed by theafteroperation - Throws:
java.lang.NullPointerException- ifafteris null
-
-