Interface MessageSource<T>
- Type Parameters:
T
- the expected payload type.
- All Superinterfaces:
IntegrationPattern
- All Known Implementing Classes:
AbstractFetchLimitingMessageSource
,AbstractMessageSource
,CorrelatingMessageBarrier
,ExpressionEvaluatingMessageSource
,MessageProcessorMessageSource
,MethodInvokingMessageSource
,ResourceRetrievingMessageSource
- 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 MessageSource<T> extends IntegrationPattern
Base interface for any source of
Messages
that can be polled.-
Method Summary
Modifier and Type Method Description default IntegrationPatternType
getIntegrationPatternType()
Return a pattern type this component implements.org.springframework.messaging.Message<T>
receive()
Retrieve the next available message from this source.
-
Method Details
-
receive
Retrieve the next available message from this source. Returnsnull
if no message is available.- Returns:
- The message or null.
-
getIntegrationPatternType
Description copied from interface:IntegrationPattern
Return a pattern type this component implements.- Specified by:
getIntegrationPatternType
in interfaceIntegrationPattern
- Returns:
- the
IntegrationPatternType
this component implements.
-