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 void
publishOnFailedToAcquire(java.lang.Object source, Context context, java.lang.String role)
Publish a failure to acquire event.void
publishOnGranted(java.lang.Object source, Context context, java.lang.String role)
Publish a granted event.void
publishOnRevoked(java.lang.Object source, Context context, java.lang.String role)
Publish a revoked event.void
setApplicationEventPublisher(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: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
public void publishOnFailedToAcquire(java.lang.Object source, Context context, java.lang.String role)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
public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)- Specified by:
setApplicationEventPublisher
in interfaceorg.springframework.context.ApplicationEventPublisherAware
-