blob: 18987ead79e73237b2dc8f0c96f54ee317569c99 [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 /**
21 * Signifies that a link has been removed.
22 */
23 LINK_REMOVED
24 }
25
26 /**
27 * Creates an event of a given type and for the specified link and the
28 * current time.
29 *
30 * @param type link event type
31 * @param link event link subject
32 */
33 public LinkEvent(Type type, Link link) {
34 super(type, link);
35 }
36
37 /**
38 * Creates an event of a given type and for the specified link and time.
39 *
40 * @param type link event type
41 * @param link event link subject
42 * @param time occurrence time
43 */
44 public LinkEvent(Type type, Link link, long time) {
45 super(type, link, time);
46 }
47
48}