blob: baefa67957928ad5d3c33a14805f22b3a889b5c6 [file] [log] [blame]
tome33cc1a2014-08-25 21:59:41 -07001package org.onlab.onos.event;
2
3/**
tom96dfcab2014-08-28 09:26:03 -07004 * Abstraction of an of a time-stamped event pertaining to an arbitrary subject.
tome33cc1a2014-08-25 21:59:41 -07005 */
6public interface Event<T extends Enum, S extends Object> {
7
8 /**
9 * Returns the timestamp of when the event occurred, given in milliseconds
10 * since the start of epoch.
11 *
12 * @return timestamp in milliseconds
13 */
14 long time();
15
16 /**
17 * Returns the type of the event.
18 *
19 * @return event type
20 */
21 T type();
22
23 /**
24 * Returns the subject of the event.
25 *
26 * @return subject to which this event pertains
27 */
28 S subject();
29
30}