Interface EventInfo

All Known Subinterfaces:
CloudletEventInfo, CloudletResourceAllocationFailEventInfo, CloudletVmEventInfo, DatacenterBrokerEventInfo, DatacenterEventInfo, HostEventInfo, HostUpdatesVmsProcessingEventInfo, SimEvent, VmDatacenterEventInfo, VmEventInfo, VmHostEventInfo
All Known Implementing Classes:
CloudSimEvent, DatacenterVmMigrationEventInfo

public interface EventInfo
A general interface that represents data to be passed to EventListener objects that are registered to be notified when some events happen for a given simulation entity such as a Datacenter, Host, Vm, Cloudlet and so on.

There is not implementing class for such interfaces because instances of them are just Data Type Objects (DTO) that just store data and do not have business rules. Each interface that extends this one has a getInstance() method to create an object from that interface. Such method uses the JDK8 static methods for interfaces to provide such a feature e reduce the number of classes, providing a simpler design.

Since:
CloudSim Plus 1.0
Author:
Manoel Campos da Silva Filho
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends EventInfo>
    EventListener<T>
    Gets the listener that was notified about the event.
    double
    Gets the time the event happened.
    static EventInfo
    of(EventListener<EventInfo> listener, double time)
    Gets a EventInfo instance from the given parameters.
  • Method Details

    • getTime

      double getTime()
      Gets the time the event happened.
      Returns:
    • getListener

      <T extends EventInfo> EventListener<T> getListener()
      Gets the listener that was notified about the event.
      Returns:
    • of

      static EventInfo of(EventListener<EventInfo> listener, double time)
      Gets a EventInfo instance from the given parameters.
      Parameters:
      listener - the listener to be notified about the event
      time - the time the event happened
      Returns: