Class ActivatorEvent

java.lang.Object
org.efs.activator.event.ActivatorEvent
All Implemented Interfaces:
IEfsEvent

public final class ActivatorEvent extends Object implements IEfsEvent
As EfsActivator steps through its workflow, its publishes two ActivatorEvents for each step:
  1. An in-progress transition with a zero transition duration.
  2. Either a successful completion or failed completion. If failed, then contains exception causing the failure. In both cases, transition execution time is provided.

An activator event contains the following fields:

An agent wishing to receive activator events should register with the activator executing the workflows.

Author:
Charles W. Rapp
  • Field Details

  • Method Details

    • equals

      public boolean equals(Object o)
      Returns true if o is a non-null ActivorEvent instance whose agent name, step name, step state, initial and final states are equal. This method ignores the duration and optional exception associated with the event.

      This equals implementation is designed to facilitate units tests only.

      Overrides:
      equals in class Object
      Parameters:
      o - comparison object.
      Returns:
      true if this ActivatorEvent equals o and false otherwise.
    • hashCode

      public int hashCode()
      Activator event hash code based on unique agent name, workflow step name, workflow step state, agent current state, and agent target final state.
      Overrides:
      hashCode in class Object
      Returns:
      integer hash value for this activator event.
    • toString

      public String toString()
      Returns a single text line containing agent name, initial state, and final state.
      Overrides:
      toString in class Object
      Returns:
      activator event as text.
    • getAgentName

      public String getAgentName()
      Returns efs agent name.
      Returns:
      agent name.
    • getStepName

      public String getStepName()
      Returns workflow step name.
      Returns:
      workflow step name.
    • getStepState

      public ActivatorEvent.StepState getStepState()
      Returns workflow step's state.
      Returns:
      workflow step state.
    • getInitialState

      public EfsAgentState getInitialState()
      Returns agent initial state.
      Returns:
      agent initial state.
    • getFinalState

      public EfsAgentState getFinalState()
      Returns target agent final state.
      Returns:
      agent final state.
    • getDuration

      public Duration getDuration()
      Returns allowed transition time.
      Returns:
      allowed transition time.
    • getException

      @Nullable public Throwable getException()
      Returns optional getException associated with a failed step.
      Returns:
      getException associated with failed step.
    • builder

      public static ActivatorEvent.Builder builder()
      Returns a new activator event builder instance.
      Returns:
      new activator event builder.