Package org.cloudsimplus.listeners
EventListener
implementations to enable event notifications during simulation execution.
These notifications are related to changes in the state of simulation entities. The listeners enable, for instance, notifying when:
- a Host updates the processing of its VMs, it is allocated to a Vm or it is deallocated from a Vm;
- a Vm has its processing updated or fails to be placed at a Host due to lack of resources;
- a Cloudlet has its processing updated, it finishes its execution inside a Vm;
- a simulation processes any kind of event.
These listeners were implemented using Java 8 functional interfaces, enabling the use of Lambda Expressions that allow a function reference to be passed as parameter to another function. Such a reference will be used to automatically call the function every time the listened event is fired. Researchers developing using just Java 7 features can also use these listeners in the old-way by passing an anonymous class to them.
Listeners allow developers to perform specific tasks when different events happen and can be largely used for monitoring purposes, metrics collection and dynamic creation of objects, such as VMs and Cloudlets, at runtime.
- Author:
- Manoel Campos da Silva Filho
-
Interface Summary Interface Description CloudletEventInfo An interface that represents data to be passed toEventListener
objects that are registered to be notified when some events happen for a givenCloudlet
.CloudletVmEventInfo An interface that represents data to be passed toEventListener
objects that are registered to be notified when some events happen for a givenCloudlet
running inside aVm
.DatacenterBrokerEventInfo An interface that represent data to be passed toEventListener
objects that are registered to be notified when some events happen for a givenDatacenterBroker
.DatacenterEventInfo An interface that represent data to be passed toEventListener
objects that are registered to be notified when some events happen for a givenDatacenter
.EventInfo A general interface that represents data to be passed toEventListener
objects that are registered to be notified when some events happen for a given simulation entity such as aDatacenter
,Host
,Vm
,Cloudlet
and so on.EventListener<T extends EventInfo> An interface to define Observers (Listeners) that listen to specific changes in the state of a given observable object (Subject).HostEventInfo An interface that represents data to be passed toEventListener
objects that are registered to be notified when some events happen for a givenHost
.HostUpdatesVmsProcessingEventInfo An interface that represents data to be passed toEventListener
objects that are registered to be notified after a Host updates the processing of its VMs.VmDatacenterEventInfo An interface that represent data to be passed toEventListener
objects that are registered to be notified when some events happen for a givenVm
running inside aDatacenter
.VmEventInfo An interface that represents data to be passed toEventListener
objects that are registered to be notified when some events happen for a givenVm
.VmHostEventInfo An interface that represents data to be passed toEventListener
objects that are registered to be notified when some events happen for a givenVm
that is related to someHost
.