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
ConstructorDescriptionInstantiates a new leader event publisher.DefaultLeaderEventPublisher
(ApplicationEventPublisher applicationEventPublisher) Instantiates a new leader event publisher. -
Method Summary
Modifier and TypeMethodDescriptionvoid
publishOnFailedToAcquire
(Object source, Context context, String role) Publish a failure to acquire event.void
publishOnGranted
(Object source, Context context, String role) Publish a granted event.void
publishOnRevoked
(Object source, Context context, String role) Publish a revoked event.void
setApplicationEventPublisher
(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:LeaderEventPublisher
Publish a granted event.- Specified by:
publishOnGranted
in interfaceLeaderEventPublisher
- Parameters:
source
- the component generated this eventcontext
- the context associated with eventrole
- the role of the leader
-
publishOnRevoked
Description copied from interface:LeaderEventPublisher
Publish a revoked event.- Specified by:
publishOnRevoked
in interfaceLeaderEventPublisher
- Parameters:
source
- the component generated this eventcontext
- the context associated with eventrole
- the role of the leader
-
publishOnFailedToAcquire
Description copied from interface:LeaderEventPublisher
Publish a failure to acquire event.- Specified by:
publishOnFailedToAcquire
in interfaceLeaderEventPublisher
- Parameters:
source
- the component generated this eventcontext
- the context associated with eventrole
- the role of the leader
-
setApplicationEventPublisher
- Specified by:
setApplicationEventPublisher
in interfaceApplicationEventPublisherAware
-