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 StringgetNodeId()Returns the node id of this event, i.e.StringgetSiteName()Returns the name of the originSitethis event was created forabstract voidperform(Environment environment, Site site)Performs the eventprotected voidsetNodeId(String nodeId)StringtoString()
-
-
-
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 theSerializerwhen serializing the event.- Returns:
- the node id
-
setNodeId
protected void setNodeId(String nodeId)
-
getSiteName
public String getSiteName()
Returns the name of the originSitethis 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- thenEnvironmentto usesite- theSitewhere the event occurred- Throws:
InvalidConfigurationException- if there's a configuration errorBusinessException- if an error occurs while performing the event
-
-