Interface PollableSource<H>

  • Type Parameters:
    H - the handler type to process the result of the poll.
    All Known Subinterfaces:
    PollableMessageSource
    All Known Implementing Classes:
    DefaultPollableMessageSource
    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 PollableSource<H>
    A mechanism to poll a consumer.
    Since:
    2.0
    Author:
    Gary Russell
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      boolean poll​(H handler)
      Poll the consumer.
      default boolean poll​(H handler, org.springframework.core.ParameterizedTypeReference<?> type)
      Poll the consumer and convert the payload to the type.
    • Method Detail

      • poll

        boolean poll​(H handler)
        Poll the consumer.
        Parameters:
        handler - the handler.
        Returns:
        true if a message was handled.
      • poll

        default boolean poll​(H handler,
                             org.springframework.core.ParameterizedTypeReference<?> type)
        Poll the consumer and convert the payload to the type. Throw a RequeueCurrentMessageException to force the current message to be requeued in the broker (after retries are exhausted, if configured).
        Parameters:
        handler - the handler.
        type - the type.
        Returns:
        true if a message was handled.