Class AbstractTargetEvent<T>

java.lang.Object
org.craftercms.deployer.api.target.event.AbstractTargetEvent<T>
Type Parameters:
T - the type of the payload
All Implemented Interfaces:
TargetEvent<T>
Direct Known Subclasses:
DeploymentRuntimeWarningEvent

public abstract class AbstractTargetEvent<T> extends Object implements TargetEvent<T>
Abstract base class for target events that carry a payload.
  • Constructor Details

    • AbstractTargetEvent

      public AbstractTargetEvent(Target target, T payload)
      Constructor for creating an event with a target and a payload.
      Parameters:
      target - the target associated with the event
      payload - the payload of the event, which can be any type. The payload is typically used to carry additional data relevant to the event.
  • Method Details

    • payload

      public T payload()
      Description copied from interface: TargetEvent
      The payload of the event. This is the data that is associated with the event, to be processed by event listeners.
      Specified by:
      payload in interface TargetEvent<T>
      Returns:
      the payload of the event
    • target

      public Target target()
      Description copied from interface: TargetEvent
      The target associated with this event.
      Specified by:
      target in interface TargetEvent<T>
      Returns:
      the target