org.springframework.jms.listener
Class DefaultMessageListenerContainer.AsyncMessageListenerInvoker
java.lang.Object
org.springframework.jms.listener.DefaultMessageListenerContainer.AsyncMessageListenerInvoker
- All Implemented Interfaces:
- java.lang.Runnable, SchedulingAwareRunnable
- Enclosing class:
- DefaultMessageListenerContainer
private class DefaultMessageListenerContainer.AsyncMessageListenerInvoker
- extends java.lang.Object
- implements SchedulingAwareRunnable
Runnable that performs looped MessageConsumer.receive()
calls.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
session
private Session session
consumer
private MessageConsumer consumer
lastRecoveryMarker
private java.lang.Object lastRecoveryMarker
lastMessageSucceeded
private boolean lastMessageSucceeded
idleTaskExecutionCount
private int idleTaskExecutionCount
idle
private volatile boolean idle
DefaultMessageListenerContainer.AsyncMessageListenerInvoker
private DefaultMessageListenerContainer.AsyncMessageListenerInvoker()
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
executeOngoingLoop
private boolean executeOngoingLoop()
throws JMSException
- Throws:
JMSException
invokeListener
private boolean invokeListener()
throws JMSException
- Throws:
JMSException
decreaseActiveInvokerCount
private void decreaseActiveInvokerCount()
initResourcesIfNecessary
private void initResourcesIfNecessary()
throws JMSException
- Throws:
JMSException
updateRecoveryMarker
private void updateRecoveryMarker()
clearResources
private void clearResources()
isLongLived
public boolean isLongLived()
- Description copied from interface:
SchedulingAwareRunnable
- Return whether the Runnable's operation is long-lived
(
true
) versus short-lived (false
).
In the former case, the task will not allocate a thread from the thread
pool (if any) but rather be considered as long-running background thread.
This should be considered a hint. Of course TaskExecutor implementations
are free to ignore this flag and the SchedulingAwareRunnable interface overall.
- Specified by:
isLongLived
in interface SchedulingAwareRunnable
setIdle
public void setIdle(boolean idle)
isIdle
public boolean isIdle()