Class IntegrationEvent
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.springframework.integration.events.IntegrationEvent
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
FileIntegrationEvent
,FileServerEvent
,IpIntegrationEvent
,MailIntegrationEvent
,MessageGroupExpiredEvent
,MqttIntegrationEvent
,RedisIntegrationEvent
,RSocketConnectedEvent
,StompIntegrationEvent
,StreamClosedEvent
public abstract class IntegrationEvent extends ApplicationEvent
Base class for all
ApplicationEvent
s generated by the framework.
Contains an optional cause field; a separate Exception event hierarchy
is not possible because of Java single inheritance (modules should make
all their events subclasses of 'xxxIntegrationEvent').- Since:
- 3.0
- Author:
- Gary Russell
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description IntegrationEvent(Object source)
IntegrationEvent(Object source, Throwable cause)
-
Method Summary
Modifier and Type Method Description Throwable
getCause()
<T> T
getSourceAsType()
Get the source as a specific type; the receiving variable must be declared with the correct type.String
toString()
-
Field Details
-
Constructor Details
-
Method Details
-
getCause
-
getSourceAsType
public <T> T getSourceAsType()Get the source as a specific type; the receiving variable must be declared with the correct type.- Type Parameters:
T
- the type.- Returns:
- the source.
- Since:
- 5.4
-
toString
- Overrides:
toString
in classEventObject
-