ApplicationEvent that carries an arbitrary payload.
ApplicationEventPublisher#publishEvent(Object), ApplicationListener#forPayload(Consumer)
| Modifier and Type | Field and Description |
|---|---|
| private final T | |
| private final ResolvableType |
| Access | Constructor and Description |
|---|---|
| public | PayloadApplicationEvent(Object
the object on which the event initially occurred (never source, T null)the payload object (never payload)null)Create a new PayloadApplicationEvent, using the instance to infer its type. |
| public | PayloadApplicationEvent(Object
the object on which the event initially occurred (never source, T null)the payload object (never payload, ResolvableType null)the type object of payload object (can be payloadType)null).
Note that this is meant to indicate the payload type (e.g. String),
not the full event type (such as PayloadApplicationEvent<<String>).Create a new PayloadApplicationEvent based on the provided payload type. |
| Modifier and Type | Method and Description |
|---|---|
| public T | |
| public ResolvableType | getResolvableType()
Implements org. Return the |
| payload | back to summary |
|---|---|
| private final T payload | |
| payloadType | back to summary |
|---|---|
| private final ResolvableType payloadType | |
| PayloadApplicationEvent | back to summary |
|---|---|
| public PayloadApplicationEvent(Object source, T payload) Create a new PayloadApplicationEvent, using the instance to infer its type.
| |
| PayloadApplicationEvent | back to summary |
|---|---|
| public PayloadApplicationEvent(Object source, T payload, ResolvableType payloadType) Create a new PayloadApplicationEvent based on the provided payload type.
| |
| getPayload | back to summary |
|---|---|
| public T getPayload() Return the payload of the event. | |
| getResolvableType | back to summary |
|---|---|
| public ResolvableType getResolvableType() Implements org. Doc from org. Return the
| |