Class ListenerContainerIdleEvent
- java.lang.Object
-
- java.util.EventObject
-
- org.springframework.context.ApplicationEvent
-
- org.springframework.amqp.event.AmqpEvent
-
- org.springframework.amqp.rabbit.listener.ListenerContainerIdleEvent
-
- All Implemented Interfaces:
Serializable
public class ListenerContainerIdleEvent extends AmqpEvent
An event that is emitted when a container is idle if the container is configured to do so.- Since:
- 1.6
- Author:
- Gary Russell
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description ListenerContainerIdleEvent(Object source, long idleTime, String id, String... queueNames)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getIdleTime()
How long the container has been idle.String
getListenerId()
The id of the listener (if@RabbitListener
) or the container bean name.String[]
getQueueNames()
The queues the container is listening to.String
toString()
-
Methods inherited from class org.springframework.context.ApplicationEvent
getTimestamp
-
Methods inherited from class java.util.EventObject
getSource
-
-
-
-
Method Detail
-
getIdleTime
public long getIdleTime()
How long the container has been idle.- Returns:
- the time in milliseconds.
-
getQueueNames
public String[] getQueueNames()
The queues the container is listening to.- Returns:
- the queue names.
-
getListenerId
@Nullable public String getListenerId()
The id of the listener (if@RabbitListener
) or the container bean name.- Returns:
- the id.
-
toString
public String toString()
- Overrides:
toString
in classEventObject
-
-