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&nbsp;session, jakarta.jms.QueueBrowser&nbsp;browser)
    Perform operations on the given session and QueueBrowser.
  • Method Details

    • doInJms

      @Nullable T&nbsp;doInJms(jakarta.jms.session&nbsp;session, jakarta.jms.QueueBrowser&nbsp;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