Package sk.antons.siutils.core
Class InactivityDelayMessageSource<T>
java.lang.Object
sk.antons.siutils.core.InactivityDelayMessageSource<T>
- All Implemented Interfaces:
org.springframework.integration.core.MessageSource<T>,org.springframework.integration.IntegrationPattern
public class InactivityDelayMessageSource<T>
extends Object
implements org.springframework.integration.core.MessageSource<T>
Makes delay after delegated message source returns null.
Useful if you have messagesource which produces many messages at once and
then long time none. And you want to fetch messages often in time whend they
are prepared.
- Author:
- antons
-
Constructor Summary
ConstructorsConstructorDescriptionInactivityDelayMessageSource(org.springframework.integration.core.MessageSource<T> delegate) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.integration.IntegrationPatternTypeinactivityDelay(Duration delay) static <P> InactivityDelayMessageSource<P>of(org.springframework.integration.core.MessageSource<P> delegate) org.springframework.messaging.Message<T>receive()
-
Constructor Details
-
InactivityDelayMessageSource
-
-
Method Details
-
inactivityDelay
-
of
public static <P> InactivityDelayMessageSource<P> of(org.springframework.integration.core.MessageSource<P> delegate) -
receive
- Specified by:
receivein interfaceorg.springframework.integration.core.MessageSource<T>
-
getIntegrationPatternType
public org.springframework.integration.IntegrationPatternType getIntegrationPatternType()- Specified by:
getIntegrationPatternTypein interfaceorg.springframework.integration.IntegrationPattern- Specified by:
getIntegrationPatternTypein interfaceorg.springframework.integration.core.MessageSource<T>
-