Package com.consol.citrus.message
Interface MessageSelector
-
- All Known Implementing Classes:
MessageSelector.AllAcceptingMessageSelector
- 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 MessageSelector
- Author:
- Christoph Deppisch
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classMessageSelector.AllAcceptingMessageSelectorSpecial message selector accepts all messages on queue.static interfaceMessageSelector.MessageSelectorFactoryFactory capable of creating a message selector from key value pairs.
-
Field Summary
Fields Modifier and Type Field Description static Map<String,MessageSelector.MessageSelectorFactory>factoriesstatic org.slf4j.LoggerLOGLoggerstatic StringRESOURCE_PATHMessage selector resource lookup pathstatic TypeResolverTYPE_RESOLVERType resolver to find custom message selectors on classpath via resource path lookup
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaccept(Message message)Checks weather this selector should accept given message or not.static Map<String,MessageSelector.MessageSelectorFactory>lookup()Resolves all available selectors from resource path lookup.
-
-
-
Field Detail
-
LOG
static final org.slf4j.Logger LOG
Logger
-
RESOURCE_PATH
static final String RESOURCE_PATH
Message selector resource lookup path- See Also:
- Constant Field Values
-
TYPE_RESOLVER
static final TypeResolver TYPE_RESOLVER
Type resolver to find custom message selectors on classpath via resource path lookup
-
factories
static final Map<String,MessageSelector.MessageSelectorFactory> factories
-
-
Method Detail
-
lookup
static Map<String,MessageSelector.MessageSelectorFactory> lookup()
Resolves all available selectors from resource path lookup. Scans classpath for validator meta information and instantiates those selectors.- Returns:
-
accept
boolean accept(Message message)
Checks weather this selector should accept given message or not. When accepting the message the selective consumer is provided with the message otherwise the message is skipped for this consumer.- Parameters:
message-- Returns:
- true to accept the message, false to decline.
-
-