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 Object implements LeaderEventPublisher, org.springframework.context.ApplicationEventPublisherAware
Default implementation of LeaderEventPublisher.
  • 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(Object source, Context context, 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(Object source, Context context, 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(Object source, Context context, 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