类 PayloadApplicationEvent<T>
java.lang.Object
java.util.EventObject
cn.taketoday.context.ApplicationEvent
cn.taketoday.context.PayloadApplicationEvent<T>
- 类型参数:
T- the payload type of the event
- 所有已实现的接口:
cn.taketoday.core.ResolvableTypeProvider,Serializable
public class PayloadApplicationEvent<T>
extends ApplicationEvent
implements cn.taketoday.core.ResolvableTypeProvider
An
ApplicationEvent that carries an arbitrary payload.- 从以下版本开始:
- 4.0 2022/3/11 23:07
- 作者:
- Stephane Nicoll, Juergen Hoeller, Qimiao Chen, Harry Yang
- 另请参阅:
-
字段概要
从类继承的字段 java.util.EventObject
source -
构造器概要
构造器构造器说明PayloadApplicationEvent(Object source, T payload) Create a new PayloadApplicationEvent, using the instance to infer its type.PayloadApplicationEvent(Object source, T payload, cn.taketoday.core.ResolvableType payloadType) Create a new PayloadApplicationEvent. -
方法概要
修饰符和类型方法说明Return the payload of the event.cn.taketoday.core.ResolvableType从类继承的方法 cn.taketoday.context.ApplicationEvent
getTimestamp从类继承的方法 java.util.EventObject
getSource, toString
-
构造器详细资料
-
PayloadApplicationEvent
public PayloadApplicationEvent(Object source, T payload, @Nullable cn.taketoday.core.ResolvableType payloadType) Create a new PayloadApplicationEvent.- 参数:
source- the object on which the event initially occurred (nevernull)payload- the payload object (nevernull)payloadType- the type object of payload object (can benull)
-
PayloadApplicationEvent
Create a new PayloadApplicationEvent, using the instance to infer its type.- 参数:
source- the object on which the event initially occurred (nevernull)payload- the payload object (nevernull)
-
-
方法详细资料
-
getResolvableType
public cn.taketoday.core.ResolvableType getResolvableType()- 指定者:
getResolvableType在接口中cn.taketoday.core.ResolvableTypeProvider
-
getPayload
Return the payload of the event.
-