Class DefaultLeaderEventPublisher

java.lang.Object
org.springframework.integration.leader.event.DefaultLeaderEventPublisher
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationEventPublisherAware, LeaderEventPublisher

public class DefaultLeaderEventPublisher
extends java.lang.Object
implements LeaderEventPublisher, org.springframework.context.ApplicationEventPublisherAware
Default implementation of LeaderEventPublisher.
  • Constructor Summary

    Constructors 
    Constructor Description
    DefaultLeaderEventPublisher()
    Instantiates a new leader event publisher.
    DefaultLeaderEventPublisher​(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
    Instantiates a new leader event publisher.
  • Method Summary

    Modifier and Type Method Description
    void publishOnFailedToAcquire​(java.lang.Object source, Context context, java.lang.String role)
    Publish a failure to acquire event.
    void publishOnGranted​(java.lang.Object source, Context context, java.lang.String role)
    Publish a granted event.
    void publishOnRevoked​(java.lang.Object source, Context context, java.lang.String role)
    Publish a revoked event.
    void setApplicationEventPublisher​(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)  

    Methods inherited from class java.lang.Object

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

    • DefaultLeaderEventPublisher

      public DefaultLeaderEventPublisher()
      Instantiates a new leader event publisher.
    • DefaultLeaderEventPublisher

      public DefaultLeaderEventPublisher​(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
      Instantiates a new leader event publisher.
      Parameters:
      applicationEventPublisher - the application event publisher
  • Method Details

    • publishOnGranted

      public void publishOnGranted​(java.lang.Object source, Context context, java.lang.String role)
      Description copied from interface: LeaderEventPublisher
      Publish a granted event.
      Specified by:
      publishOnGranted in interface LeaderEventPublisher
      Parameters:
      source - the component generated this event
      context - the context associated with event
      role - the role of the leader
    • publishOnRevoked

      public void publishOnRevoked​(java.lang.Object source, Context context, java.lang.String role)
      Description copied from interface: LeaderEventPublisher
      Publish a revoked event.
      Specified by:
      publishOnRevoked in interface LeaderEventPublisher
      Parameters:
      source - the component generated this event
      context - the context associated with event
      role - the role of the leader
    • publishOnFailedToAcquire

      public void publishOnFailedToAcquire​(java.lang.Object source, Context context, java.lang.String role)
      Description copied from interface: LeaderEventPublisher
      Publish a failure to acquire event.
      Specified by:
      publishOnFailedToAcquire in interface LeaderEventPublisher
      Parameters:
      source - the component generated this event
      context - the context associated with event
      role - the role of the leader
    • setApplicationEventPublisher

      public void setApplicationEventPublisher​(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
      Specified by:
      setApplicationEventPublisher in interface org.springframework.context.ApplicationEventPublisherAware