Class BrokerEvent
- java.lang.Object
-
- java.util.EventObject
-
- org.springframework.context.ApplicationEvent
-
- org.springframework.amqp.event.AmqpEvent
-
- org.springframework.amqp.rabbit.core.BrokerEvent
-
- All Implemented Interfaces:
Serializable
public class BrokerEvent extends AmqpEvent
Represents a broker event generated by the Event Exchange Plugin (https://www.rabbitmq.com/event-exchange.html).- Since:
- 2.1
- Author:
- Gary Russell
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description BrokerEvent(Object source, MessageProperties properties)
Create an instance with the provided source and properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
getEventProperties()
Properties of the eventMessageProperties.getHeaders()
.String
getEventType()
The event type (MessageProperties.getReceivedRoutingKey()
).MessageProperties
getMessageProperties()
The completeMessageProperties
from the event representing the event.String
toString()
-
Methods inherited from class org.springframework.context.ApplicationEvent
getTimestamp
-
Methods inherited from class java.util.EventObject
getSource
-
-
-
-
Constructor Detail
-
BrokerEvent
public BrokerEvent(Object source, MessageProperties properties)
Create an instance with the provided source and properties.- Parameters:
source
- the source.properties
- the properties.
-
-
Method Detail
-
getEventType
public String getEventType()
The event type (MessageProperties.getReceivedRoutingKey()
).- Returns:
- the type.
-
getEventProperties
public Map<String,Object> getEventProperties()
Properties of the eventMessageProperties.getHeaders()
.- Returns:
- the properties.
-
getMessageProperties
public MessageProperties getMessageProperties()
The completeMessageProperties
from the event representing the event. (The body is always blank).- Returns:
- the message properties.
-
toString
public String toString()
- Overrides:
toString
in classEventObject
-
-