private class DefaultMessageListenerContainer.AsyncMessageListenerInvoker extends java.lang.Object implements SchedulingAwareRunnable
MessageConsumer.receive()
calls.Modifier and Type | Field and Description |
---|---|
private MessageConsumer |
consumer |
private boolean |
idle |
private int |
idleTaskExecutionCount |
private boolean |
lastMessageSucceeded |
private java.lang.Object |
lastRecoveryMarker |
private Session |
session |
Modifier | Constructor and Description |
---|---|
private |
DefaultMessageListenerContainer.AsyncMessageListenerInvoker() |
Modifier and Type | Method and Description |
---|---|
private void |
clearResources() |
private void |
decreaseActiveInvokerCount() |
private boolean |
executeOngoingLoop() |
private void |
initResourcesIfNecessary() |
private boolean |
invokeListener() |
boolean |
isIdle() |
boolean |
isLongLived()
Return whether the Runnable's operation is long-lived
(
true ) versus short-lived (false ). |
void |
run() |
void |
setIdle(boolean idle) |
private void |
updateRecoveryMarker() |
private Session session
private MessageConsumer consumer
private java.lang.Object lastRecoveryMarker
private boolean lastMessageSucceeded
private int idleTaskExecutionCount
private volatile boolean idle
private DefaultMessageListenerContainer.AsyncMessageListenerInvoker()
public void run()
run
in interface java.lang.Runnable
private boolean executeOngoingLoop() throws JMSException
JMSException
private boolean invokeListener() throws JMSException
JMSException
private void decreaseActiveInvokerCount()
private void initResourcesIfNecessary() throws JMSException
JMSException
private void updateRecoveryMarker()
private void clearResources()
public boolean isLongLived()
SchedulingAwareRunnable
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.
isLongLived
in interface SchedulingAwareRunnable
public void setIdle(boolean idle)
public boolean isIdle()