public class InboundSink extends java.lang.Object implements InboundMessageHandlers.MessageConsumer
MessagingService
is IVerbHandler.doVerb(Message)
, but it can be overridden
to filter out certain messages, record the fact of attempted delivery, or delay arrival.
This facility is most useful for test code.
accept(Message)
is invoked on a thread belonging to the Stage
assigned to the Verb
of the message.Modifier and Type | Method and Description |
---|---|
void |
accept(Message<?> message) |
void |
add(java.util.function.Predicate<Message<?>> allow) |
boolean |
allow(Message<?> message)
Deprecated.
|
void |
clear() |
void |
fail(Message.Header header,
java.lang.Throwable failure) |
void |
remove(java.util.function.Predicate<Message<?>> allow) |
public void fail(Message.Header header, java.lang.Throwable failure)
fail
in interface InboundMessageHandlers.MessageConsumer
public void accept(Message<?> message)
accept
in interface java.util.function.Consumer<Message<?>>
public void add(java.util.function.Predicate<Message<?>> allow)
public void remove(java.util.function.Predicate<Message<?>> allow)
public void clear()
@Deprecated public boolean allow(Message<?> message)
Copyright © 2009-2021 The Apache Software Foundation