Interface BrowserCallback<T>

Type Parameters:
T - the result type
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 BrowserCallback<T>
Callback for browsing the messages in a JMS queue.

To be used with JmsTemplate's callback methods that take a BrowserCallback argument, often implemented as an anonymous inner class or as a lambda expression.

Since:
2.5.1
Author:
Juergen Hoeller
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    doInJms(jakarta.jms.Session session, jakarta.jms.QueueBrowser browser)
    Perform operations on the given Session and QueueBrowser.
  • Method Details

    • doInJms

      @Nullable T doInJms(jakarta.jms.Session session, jakarta.jms.QueueBrowser browser) throws jakarta.jms.JMSException
      Perform operations on the given Session and QueueBrowser.
      Parameters:
      session - the JMS Session object to use
      browser - the JMS QueueBrowser object to use
      Returns:
      a result object from working with the Session, if any (or null if none)
      Throws:
      jakarta.jms.JMSException - if thrown by JMS API methods