T
- the payload type of the eventpublic class PayloadApplicationEvent<T> extends ApplicationEvent implements ResolvableTypeProvider
ApplicationEvent
that carries an arbitrary payload.ApplicationEventPublisher.publishEvent(Object)
,
ApplicationListener.forPayload(Consumer)
,
Serialized Formsource
Constructor and Description |
---|
PayloadApplicationEvent(Object source,
T payload)
Create a new PayloadApplicationEvent.
|
Modifier and Type | Method and Description |
---|---|
T |
getPayload()
Return the payload of the event.
|
ResolvableType |
getResolvableType()
Return the
ResolvableType describing this instance
(or null if some sort of default should be applied instead). |
getTimestamp
getSource, toString
public ResolvableType getResolvableType()
ResolvableTypeProvider
ResolvableType
describing this instance
(or null
if some sort of default should be applied instead).getResolvableType
in interface ResolvableTypeProvider
public T getPayload()