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
Base
ApplicationEvent
class for leader based events. All custom event
classes should be derived from this class.- Author:
- Janne Valkealahti, Gary Russell
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionAbstractLeaderEvent
(Object source) Create a new ApplicationEvent.AbstractLeaderEvent
(Object source, Context context, String role) Create a new ApplicationEvent. -
Method Summary
Methods inherited from class org.springframework.context.ApplicationEvent
getTimestamp
Methods inherited from class java.util.EventObject
getSource
-
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 theContext
associated with this event.- Returns:
- the context
-
getRole
Get the role of the leader.- Returns:
- the role
-
toString
- Overrides:
toString
in classEventObject
-