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 Summary
ConstructorsConstructorDescriptionInstantiates a new leader event publisher.DefaultLeaderEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher) Instantiates a new leader event publisher. -
Method Summary
Modifier and TypeMethodDescriptionvoidpublishOnFailedToAcquire(Object source, Context context, String role) Publish a failure to acquire event.voidpublishOnGranted(Object source, Context context, String role) Publish a granted event.voidpublishOnRevoked(Object source, Context context, 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
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
-