blob: 6f825f89e1e29d7ce69c34807ec00667ba56dfcf [file] [log] [blame]
Thomas Vachuska41f4d3e2015-06-24 10:57:25 -07001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2015-present Open Networking Foundation
Thomas Vachuska41f4d3e2015-06-24 10:57:25 -07003 *
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.net.edge;
17
18import org.onosproject.event.AbstractEvent;
19import org.onosproject.net.ConnectPoint;
20
21/**
22 * Describes an event pertaining to edge-port inventory.
23 */
24public class EdgePortEvent extends AbstractEvent<EdgePortEvent.Type, ConnectPoint> {
25
26 public enum Type {
27 /**
28 * Signifies that a new edge port was detected.
29 */
30 EDGE_PORT_ADDED,
31
32 /**
33 * Signifies that a new edge port vanished.
34 */
35 EDGE_PORT_REMOVED
36 }
37
38 /**
39 * Creates a new edge port event.
40 *
41 * @param type event type
42 * @param subject connection point subject
43 */
Aaron Kruglikova2b59152015-06-24 14:01:41 -070044 public EdgePortEvent(Type type, ConnectPoint subject) {
Thomas Vachuska41f4d3e2015-06-24 10:57:25 -070045 super(type, subject);
46 }
47
48 /**
49 * Creates a new edge port event.
50 *
51 * @param type event type
52 * @param subject connection point subject
53 * @param time occurrence time
54 */
Aaron Kruglikova2b59152015-06-24 14:01:41 -070055 public EdgePortEvent(Type type, ConnectPoint subject, long time) {
Thomas Vachuska41f4d3e2015-06-24 10:57:25 -070056 super(type, subject, time);
57 }
58
59}