blob: a85965ae6a3c848de7d416b6f01acdc5207bf176 [file] [log] [blame]
tom64b7aac2014-08-26 00:18:21 -07001package org.onlab.onos.net.link;
2
3import org.onlab.onos.event.AbstractEvent;
4import org.onlab.onos.net.Link;
5
6/**
7 * Describes infrastructure link event.
8 */
9public class LinkEvent extends AbstractEvent<LinkEvent.Type, Link> {
10
11 /**
12 * Type of link events.
13 */
14 public enum Type {
15 /**
16 * Signifies that a new link has been detected.
17 */
18 LINK_ADDED,
19
20 /**
tomd176fc42014-09-08 00:12:30 -070021 * Signifies that a link has been updated.
22 */
23 LINK_UPDATED,
24
25 /**
tom64b7aac2014-08-26 00:18:21 -070026 * Signifies that a link has been removed.
27 */
28 LINK_REMOVED
29 }
30
31 /**
32 * Creates an event of a given type and for the specified link and the
33 * current time.
34 *
35 * @param type link event type
36 * @param link event link subject
37 */
38 public LinkEvent(Type type, Link link) {
39 super(type, link);
40 }
41
42 /**
43 * Creates an event of a given type and for the specified link and time.
44 *
45 * @param type link event type
46 * @param link event link subject
47 * @param time occurrence time
48 */
49 public LinkEvent(Type type, Link link, long time) {
50 super(type, link, time);
51 }
52
53}