Class AbstractLeaderEvent
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.springframework.integration.leader.event.AbstractLeaderEvent
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
OnFailedToAcquireMutexEvent,OnGrantedEvent,OnRevokedEvent
public abstract class AbstractLeaderEvent extends ApplicationEvent
Base
ApplicationEvent class for leader based events. All custom event
classes should be derived from this class.- Author:
- Janne Valkealahti, Gary Russell
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description AbstractLeaderEvent(Object source)Create a new ApplicationEvent.AbstractLeaderEvent(Object source, Context context, String role)Create a new ApplicationEvent. -
Method Summary
-
Constructor Details
-
AbstractLeaderEvent
Create a new ApplicationEvent.- Parameters:
source- the component that published the event (nevernull)
-
AbstractLeaderEvent
Create a new ApplicationEvent.- Parameters:
source- the component that published the event (nevernull)context- the context associated with this eventrole- the role of the leader
-
-
Method Details
-
getContext
Get theContextassociated with this event.- Returns:
- the context
-
getRole
Get the role of the leader.- Returns:
- the role
-
toString
- Overrides:
toStringin classEventObject
-