EventInfo

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.

Author:Manoel Campos da Silva Filho

See also: DatacenterEventInfo, HostEventInfo, VmEventInfo, CloudletEventInfo

Methods

getListener

EventListener<? extends EventInfo> getListener()

Gets the listener that was notified about the event.

getTime

double getTime()

Gets the time the event happened.

of

static EventInfo of(EventListener<? extends 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