blob: 4050734a7e8e74a49bdc4d3e9809edae36bd5e62 [file] [log] [blame]
Satish Kf6d87cb2015-11-30 19:59:22 +05301/*
2 * Copyright 2014 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.iptopology.api.link;
17
18import org.onosproject.event.AbstractEvent;
19import org.onosproject.iptopology.api.IpLink;
20
21/**
22 * Describes ip link event.
23 */
24public class IpLinkEvent extends AbstractEvent<IpLinkEvent.Type, IpLink> {
25
26 /**
27 * Type of link events.
28 */
29 public enum Type {
30 /**
31 * Signifies that a new ip link has been detected.
32 */
33 LINK_ADDED,
34
35 /**
36 * Signifies that an ip link has been updated or changed state.
37 */
38 LINK_UPDATED,
39
40 /**
41 * Signifies that an ip link has been removed.
42 */
43 LINK_REMOVED
44 }
45
46 /**
47 * Creates an event of a given type and for the specified ip link and the
48 * current time.
49 *
50 * @param type link event type
51 * @param link event link subject
52 */
53 public IpLinkEvent(Type type, IpLink link) {
54 super(type, link);
55 }
56
57 /**
58 * Creates an event of a given type and for the specified ip link and time.
59 *
60 * @param type link event type
61 * @param link event link subject
62 * @param time occurrence time
63 */
64 public IpLinkEvent(Type type, IpLink link, long time) {
65 super(type, link, time);
66 }
67
68}