Class AbstractLeaderEvent

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

public abstract class AbstractLeaderEvent
extends org.springframework.context.ApplicationEvent
Base ApplicationEvent class for leader based events. All custom event classes should be derived from this class.
See Also:
Serialized Form
  • Field Summary

    Fields inherited from class java.util.EventObject

    source
  • Constructor Summary

    Constructors 
    Constructor Description
    AbstractLeaderEvent​(java.lang.Object source)
    Create a new ApplicationEvent.
    AbstractLeaderEvent​(java.lang.Object source, Context context, java.lang.String role)
    Create a new ApplicationEvent.
  • Method Summary

    Modifier and Type Method Description
    Context getContext()
    Get the Context associated with this event.
    java.lang.String getRole()
    Get the role of the leader.
    java.lang.String toString()  

    Methods inherited from class org.springframework.context.ApplicationEvent

    getTimestamp

    Methods inherited from class java.util.EventObject

    getSource

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • AbstractLeaderEvent

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

      public AbstractLeaderEvent​(java.lang.Object source, Context context, java.lang.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 java.lang.String getRole()
      Get the role of the leader.
      Returns:
      the role
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.util.EventObject