Package org.appng.api.messaging
Class Event
- java.lang.Object
-
- org.appng.api.messaging.Event
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
HeartBeat.HeartBeatEvent
,NodeEvent
,ReloadSiteEvent
,ReloadTemplateEvent
,RequestNodeState
,SiteDeletedEvent
,SiteStateEvent
,StopSiteEvent
public abstract class Event extends Object implements Serializable
- Author:
- Matthias Müller
- See Also:
Sender
,Receiver
,Site.sendEvent(Event)
, Serialized Form
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String
getNodeId()
Returns the node id of this event, i.e.String
getSiteName()
Returns the name of the originSite
this event was created forabstract void
perform(Environment environment, Site site)
Performs the eventprotected void
setNodeId(String nodeId)
String
toString()
-
-
-
Method Detail
-
getNodeId
public String getNodeId()
Returns the node id of this event, i.e. the node id of the origin node. The node id is automatically set by theSerializer
when serializing the event.- Returns:
- the node id
-
setNodeId
protected void setNodeId(String nodeId)
-
getSiteName
public String getSiteName()
Returns the name of the originSite
this event was created for- Returns:
- the name of the
Site
-
perform
public abstract void perform(Environment environment, Site site) throws InvalidConfigurationException, BusinessException
Performs the event- Parameters:
environment
- thenEnvironment
to usesite
- theSite
where the event occurred- Throws:
InvalidConfigurationException
- if there's a configuration errorBusinessException
- if an error occurs while performing the event
-
-