Top Description Methods
org.springframework.jms.core

public Interface SessionCallback<T>

Annotations
@FunctionalInterface
Type Parameters
<T>
the result type
Imports
jakarta.jms.JMSException, .Session, org.springframework.lang.Nullable

Callback for executing any number of operations on a provided Session.

To be used with the JmsTemplate#execute(SessionCallback) method, often implemented as an anonymous inner class or as a lambda expression.

Author
Mark Pollack
Since
1.1
See Also
JmsTemplate#execute(SessionCallback)

Method Summary

Modifier and TypeMethod and Description
public T

Returns:

a result object from working with the Session, if any (or null if none)
doInJms
(Session
the JMS Session
session
)

Execute any number of operations against the supplied JMS Session, possibly returning a result.

Method Detail

doInJmsback to summary
public T doInJms(Session session) throws JMSException

Execute any number of operations against the supplied JMS Session, possibly returning a result.

Parameters
session:Session

the JMS Session

Returns:T

a result object from working with the Session, if any (or null if none)

Annotations
@Nullable
Exceptions
JMSException:
if thrown by JMS API methods