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 Details

    • InactivityDelayMessageSource

      public InactivityDelayMessageSource(org.springframework.integration.core.MessageSource<T> delegate)
  • Method Details

    • inactivityDelay

      public InactivityDelayMessageSource inactivityDelay(Duration delay)
    • of

      public static <P> InactivityDelayMessageSource<P> of(org.springframework.integration.core.MessageSource<P> delegate)
    • receive

      public org.springframework.messaging.Message<T> receive()
      Specified by:
      receive in interface org.springframework.integration.core.MessageSource<T>
    • getIntegrationPatternType

      public org.springframework.integration.IntegrationPatternType getIntegrationPatternType()
      Specified by:
      getIntegrationPatternType in interface org.springframework.integration.IntegrationPattern
      Specified by:
      getIntegrationPatternType in interface org.springframework.integration.core.MessageSource<T>