类 PayloadApplicationEvent<T>
- java.lang.Object
- java.util.EventObject
- org.springframework.context.ApplicationEvent
- org.springframework.context.PayloadApplicationEvent<T>
- 类型参数:
T
- the payload type of the event
- 所有已实现的接口:
Serializable
,ResolvableTypeProvider
public class PayloadApplicationEvent<T> extends ApplicationEvent implements ResolvableTypeProvider
AnApplicationEvent
that carries an arbitrary payload.Mainly intended for internal use within the framework.
- 从以下版本开始:
- 4.2
- 作者:
- Stephane Nicoll
- 另请参阅:
- 序列化表格
字段概要
从类继承的字段 java.util.EventObject
source
构造器概要
构造器 构造器 说明 PayloadApplicationEvent(Object source, T payload)
Create a new PayloadApplicationEvent.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 T
getPayload()
Return the payload of the event.ResolvableType
getResolvableType()
Return theResolvableType
describing this instance (ornull
if some sort of default should be applied instead).从类继承的方法 org.springframework.context.ApplicationEvent
getTimestamp
从类继承的方法 java.util.EventObject
getSource, toString
构造器详细资料
PayloadApplicationEvent
public PayloadApplicationEvent(Object source, T payload)
Create a new PayloadApplicationEvent.- 参数:
source
- the object on which the event initially occurred (nevernull
)payload
- the payload object (nevernull
)
方法详细资料
getResolvableType
public ResolvableType getResolvableType()
从接口复制的说明:ResolvableTypeProvider
Return theResolvableType
describing this instance (ornull
if some sort of default should be applied instead).- 指定者:
getResolvableType
在接口中ResolvableTypeProvider
getPayload
public T getPayload()
Return the payload of the event.