Package org.springframework.context
Class PayloadApplicationEvent<T>
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.springframework.context.PayloadApplicationEvent<T>
- Type Parameters:
- T- the payload type of the event
- All Implemented Interfaces:
- Serializable,- ResolvableTypeProvider
An 
ApplicationEvent that carries an arbitrary payload.- Since:
- 4.2
- Author:
- Stephane Nicoll, Juergen Hoeller, Qimiao Chen
- See Also:
- 
Field SummaryFields inherited from class java.util.EventObjectsource
- 
Constructor SummaryConstructorsConstructorDescriptionPayloadApplicationEvent(Object source, T payload) Create a new PayloadApplicationEvent, using the instance to infer its type.PayloadApplicationEvent(Object source, T payload, ResolvableType payloadType) Create a new PayloadApplicationEvent.
- 
Method SummaryModifier and TypeMethodDescriptionReturn the payload of the event.Return theResolvableTypedescribing this instance (ornullif some sort of default should be applied instead).Methods inherited from class org.springframework.context.ApplicationEventgetTimestampMethods inherited from class java.util.EventObjectgetSource, toString
- 
Constructor Details- 
PayloadApplicationEventCreate a new PayloadApplicationEvent.- Parameters:
- source- the object on which the event initially occurred (never- null)
- payload- the payload object (never- null)
- payloadType- the type object of payload object (can be- null)
- Since:
- 6.0
 
- 
PayloadApplicationEventCreate a new PayloadApplicationEvent, using the instance to infer its type.- Parameters:
- source- the object on which the event initially occurred (never- null)
- payload- the payload object (never- null)
 
 
- 
- 
Method Details- 
getResolvableTypeDescription copied from interface:ResolvableTypeProviderReturn theResolvableTypedescribing this instance (ornullif some sort of default should be applied instead).- Specified by:
- getResolvableTypein interface- ResolvableTypeProvider
 
- 
getPayloadReturn the payload of the event.
 
-