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 voidpublishOnFailedToAcquire(java.lang.Object source, Context context, java.lang.String role)Publish a failure to acquire event.voidpublishOnGranted(java.lang.Object source, Context context, java.lang.String role)Publish a granted event.voidpublishOnRevoked(java.lang.Object source, Context context, java.lang.String role)Publish a revoked event.voidsetApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
-
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
Description copied from interface:LeaderEventPublisherPublish a granted event.- Specified by:
publishOnGrantedin interfaceLeaderEventPublisher- Parameters:
source- the component generated this eventcontext- the context associated with eventrole- the role of the leader
-
publishOnRevoked
Description copied from interface:LeaderEventPublisherPublish a revoked event.- Specified by:
publishOnRevokedin interfaceLeaderEventPublisher- Parameters:
source- the component generated this eventcontext- the context associated with eventrole- the role of the leader
-
publishOnFailedToAcquire
public void publishOnFailedToAcquire(java.lang.Object source, Context context, java.lang.String role)Description copied from interface:LeaderEventPublisherPublish a failure to acquire event.- Specified by:
publishOnFailedToAcquirein interfaceLeaderEventPublisher- Parameters:
source- the component generated this eventcontext- the context associated with eventrole- the role of the leader
-
setApplicationEventPublisher
public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)- Specified by:
setApplicationEventPublisherin interfaceorg.springframework.context.ApplicationEventPublisherAware
-