Class DefaultLeaderEventPublisher
java.lang.Object
org.springframework.integration.leader.event.DefaultLeaderEventPublisher
- All Implemented Interfaces:
Aware,ApplicationEventPublisherAware,LeaderEventPublisher
public class DefaultLeaderEventPublisher
extends Object
implements LeaderEventPublisher, ApplicationEventPublisherAware
Default implementation of
LeaderEventPublisher.- Author:
- Janne Valkealahti, Gary Russell, Glenn Renfro
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new leader event publisher.DefaultLeaderEventPublisher(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(ApplicationEventPublisher applicationEventPublisher)
-
Constructor Details
-
DefaultLeaderEventPublisher
public DefaultLeaderEventPublisher()Instantiates a new leader event publisher. -
DefaultLeaderEventPublisher
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
- Specified by:
setApplicationEventPublisherin interfaceApplicationEventPublisherAware
-