Class PollerMetadata

java.lang.Object
org.springframework.integration.scheduling.PollerMetadata

public class PollerMetadata extends Object
Author:
Mark Fisher, Oleg Zhurakousky, Gary Russell, Artem Bilan
  • Field Details

    • MAX_MESSAGES_UNBOUNDED

      public static final int MAX_MESSAGES_UNBOUNDED
      The constant for unlimited number of message to poll in one cycle.
      See Also:
    • DEFAULT_RECEIVE_TIMEOUT

      public static final long DEFAULT_RECEIVE_TIMEOUT
      The default receive timeout as one second.
      See Also:
    • DEFAULT_POLLER_METADATA_BEAN_NAME

      public static final String DEFAULT_POLLER_METADATA_BEAN_NAME
      The bean name for global default poller.
      See Also:
    • DEFAULT_POLLER

      public static final String DEFAULT_POLLER
      A convenient short alias for the global default poller bean name.
      See Also:
  • Constructor Details

    • PollerMetadata

      public PollerMetadata()
  • Method Details

    • setTransactionSynchronizationFactory

      public void setTransactionSynchronizationFactory(TransactionSynchronizationFactory transactionSynchronizationFactory)
    • getTransactionSynchronizationFactory

      public TransactionSynchronizationFactory getTransactionSynchronizationFactory()
    • setTrigger

      public void setTrigger(Trigger trigger)
    • getTrigger

      public Trigger getTrigger()
    • getErrorHandler

      public ErrorHandler getErrorHandler()
    • setErrorHandler

      public void setErrorHandler(ErrorHandler errorHandler)
    • setMaxMessagesPerPoll

      public void setMaxMessagesPerPoll(long maxMessagesPerPoll)
      Set the maximum number of messages to receive for each poll. A non-positive value indicates that polling should repeat as long as non-null messages are being received and successfully sent.

      The default is unbounded.

      Parameters:
      maxMessagesPerPoll - The maxMessagesPerPoll to set.
      See Also:
    • getMaxMessagesPerPoll

      public long getMaxMessagesPerPoll()
    • setReceiveTimeout

      public void setReceiveTimeout(long receiveTimeout)
    • getReceiveTimeout

      public long getReceiveTimeout()
    • setAdviceChain

      public void setAdviceChain(List<Advice> adviceChain)
    • getAdviceChain

      public List<Advice> getAdviceChain()
    • setTaskExecutor

      public void setTaskExecutor(Executor taskExecutor)
    • getTaskExecutor

      public Executor getTaskExecutor()
    • getSendTimeout

      public long getSendTimeout()
    • setSendTimeout

      public void setSendTimeout(long sendTimeout)
    • getDefaultPollerMetadata

      public static PollerMetadata getDefaultPollerMetadata(BeanFactory beanFactory)
      Return the default PollerMetadata bean if available.
      Parameters:
      beanFactory - BeanFactory for lookup, must not be null.
      Returns:
      The poller metadata.