blob: 1bbf665dd50d899575831b28a8c8e46ed938594a [file] [log] [blame]
Jonathan Hart4b5c6dc2015-10-13 14:27:48 -07001/*
2 * Copyright 2015 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 */
16
17package org.onosproject.incubator.net.intf;
18
19import org.onosproject.event.AbstractEvent;
20
21/**
22 * Describes an interface event.
23 */
24public class InterfaceEvent extends AbstractEvent<InterfaceEvent.Type, Interface> {
25
26 public enum Type {
27 /**
28 * Indicates a new interface has been added.
29 */
30 INTERFACE_ADDED,
31
32 /**
33 * Indicates an interface has been updated.
34 */
35 INTERFACE_UPDATED,
36
37 /**
38 * Indicates an interface has been removed.
39 */
40 INTERFACE_REMOVED
41 }
42
43 /**
44 * Creates an interface event with type and subject.
45 *
46 * @param type event type
47 * @param subject subject interface
48 */
49 public InterfaceEvent(Type type, Interface subject) {
50 super(type, subject);
51 }
52
53 /**
54 * Creates an interface event with type, subject and time.
55 *
56 * @param type event type
57 * @param subject subject interface
58 * @param time time of event
59 */
60 public InterfaceEvent(Type type, Interface subject, long time) {
61 super(type, subject, time);
62 }
63
64}