类 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
另请参阅:
  • 构造器详细资料

    • 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 (never null)
      payload - the payload object (never null)
      payloadType - the type object of payload object (can be null)
    • PayloadApplicationEvent

      public PayloadApplicationEvent(Object source, T payload)
      Create a new PayloadApplicationEvent, using the instance to infer its type.
      参数:
      source - the object on which the event initially occurred (never null)
      payload - the payload object (never null)
  • 方法详细资料

    • getResolvableType

      public cn.taketoday.core.ResolvableType getResolvableType()
      指定者:
      getResolvableType 在接口中 cn.taketoday.core.ResolvableTypeProvider
    • getPayload

      public T getPayload()
      Return the payload of the event.