Class PayloadTypeSelector
java.lang.Object
org.springframework.integration.selector.PayloadTypeSelector
- All Implemented Interfaces:
GenericSelector<org.springframework.messaging.Message<?>>,MessageSelector
public class PayloadTypeSelector extends java.lang.Object implements MessageSelector
A
MessageSelector implementation that checks the type of the
Message payload. The payload type must be assignable to at least one
of the selector's accepted types.-
Constructor Summary
Constructors Constructor Description PayloadTypeSelector(java.lang.Class<?>... types)Create a selector for the provided types. -
Method Summary
Modifier and Type Method Description booleanaccept(org.springframework.messaging.Message<?> message)
-
Constructor Details
-
PayloadTypeSelector
public PayloadTypeSelector(java.lang.Class<?>... types)Create a selector for the provided types. At least one is required.- Parameters:
types- The types.
-
-
Method Details
-
accept
public boolean accept(org.springframework.messaging.Message<?> message)- Specified by:
acceptin interfaceGenericSelector<org.springframework.messaging.Message<?>>- Specified by:
acceptin interfaceMessageSelector
-