Skip to content
This repository has been archived by the owner on Nov 4, 2021. It is now read-only.

EventArchitecture

Álvaro Carrera edited this page Jun 18, 2013 · 1 revision

#summary Describe the events

= Events =

==Introduction==

An event is something that, when it occurs, is capable of modifying the normal situation of a scenario or a network element. We have three types of events:

  • One shot events
  • Probabilistic Events.
  • Periodic Events.

==Structure== The different classes that form the Events follow the next structure: http://shanks-with-mason.googlecode.com/svn/wiki/images/architecture/EventStructure.jpg

We have two principal parts in this structure. One part is composed by Probabilistic Events and Periodic Events and the other is composed by One Shoot Events. Probabilistic and Periodic Events are thrown by the scenario itself, however the One Shoot Events are launched by the agents.

==Implementation== Tha main structure of an event have the next methods:

{{{ public void launchEvent() throws UnsupportedNetworkElementStatusException, UnsupportedScenarioStatusException { this.changeProperties(); this.changeStatus(); this.interactWithNE(); this.generateNotification(); }

private void generateNotification() {
    //Under construction      
}

public abstract void addAffectedElement(NetworkElement ne);

public abstract void addAffectedScenario(Scenario scen);

public abstract void changeProperties() throws UnsupportedNetworkElementStatusException;

public abstract void changeStatus() throws UnsupportedNetworkElementStatusException, UnsupportedScenarioStatusException;

public abstract void interactWithNE();

}}}

The aim of launchEvent() is to change the status or the properties that are defined in each event. It is called when a Periodic Event has completed its period, and Probabilistic Event ocurrs or simply when and agente make an action.

The method generateNotification is explained in its own section.

Clone this wiki locally