blob: acb762aa25283c733ca0eba460985240ba772983 [file] [log] [blame]
Mohammad Shahid4c30ea32017-08-09 18:02:10 +05301/*
2 * Copyright 2017-present Open Networking Foundation
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.evpnopenflow.rsc.baseport;
18
19import org.onosproject.event.AbstractEvent;
20import org.onosproject.evpnopenflow.rsc.BasePort;
21
22/**
23 * Describes base port event.
24 */
25public class BasePortEvent extends AbstractEvent<BasePortEvent.Type,
26 BasePort> {
27 /**
28 * Type of base port events.
29 */
30 public enum Type {
31 /**
32 * Signifies that base port has been created.
33 */
34 BASE_PORT_PUT,
35 /**
36 * Signifies that base port has been deleted.
37 */
38 BASE_PORT_DELETE,
39 /**
40 * Signifies that base port has been updated.
41 */
42 BASE_PORT_UPDATE
43 }
44
45 /**
46 * Creates an event of a given type and for the specified base port.
47 *
48 * @param type base port event type
49 * @param basePort base port subject
50 */
51 public BasePortEvent(Type type, BasePort basePort) {
52 super(type, basePort);
53 }
54
55 /**
56 * Creates an event of a given type and for the specified base port.
57 *
58 * @param type base port event type
59 * @param basePort base port subject
60 * @param time occurrence time
61 */
62 public BasePortEvent(Type type, BasePort basePort, long time) {
63 super(type, basePort, time);
64 }
65}