Class AbstractLeaderEvent

java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.springframework.integration.leader.event.AbstractLeaderEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
OnFailedToAcquireMutexEvent, OnGrantedEvent, OnRevokedEvent

public abstract class AbstractLeaderEvent extends ApplicationEvent
Base ApplicationEvent class for leader based events. All custom event classes should be derived from this class.
Author:
Janne Valkealahti, Gary Russell
See Also:
  • Constructor Details

    • AbstractLeaderEvent

      public AbstractLeaderEvent(Object source)
      Create a new ApplicationEvent.
      Parameters:
      source - the component that published the event (never null)
    • AbstractLeaderEvent

      public AbstractLeaderEvent(Object source, Context context, String role)
      Create a new ApplicationEvent.
      Parameters:
      source - the component that published the event (never null)
      context - the context associated with this event
      role - the role of the leader
  • Method Details

    • getContext

      public Context getContext()
      Get the Context associated with this event.
      Returns:
      the context
    • getRole

      public String getRole()
      Get the role of the leader.
      Returns:
      the role
    • toString

      public String toString()
      Overrides:
      toString in class EventObject