public abstract class AbstractLeaderEvent
extends org.springframework.context.ApplicationEvent
ApplicationEvent class for leader based events. All custom event
classes should be derived from this class.| Constructor and Description |
|---|
AbstractLeaderEvent(java.lang.Object source)
Create a new ApplicationEvent.
|
AbstractLeaderEvent(java.lang.Object source,
Context context,
java.lang.String role)
Create a new ApplicationEvent.
|
| Modifier and Type | Method and Description |
|---|---|
Context |
getContext()
Get the
Context associated with this event. |
java.lang.String |
getRole()
Get the role of the leader.
|
java.lang.String |
toString() |
public AbstractLeaderEvent(java.lang.Object source)
source - the component that published the event (never null)public AbstractLeaderEvent(java.lang.Object source,
Context context,
java.lang.String role)
source - the component that published the event (never null)context - the context associated with this eventrole - the role of the leaderpublic Context getContext()
Context associated with this event.public java.lang.String getRole()
public java.lang.String toString()
toString in class java.util.EventObject