blob: 3b6651f039b051d37393f195113ea47458aa9965 [file] [log] [blame]
Hyunsun Moon2c3f0ee2017-04-06 16:47:21 +09001/*
2 * Copyright 2017-present 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.opencord.cordvtn.api.node;
17
18import org.onosproject.event.AbstractEvent;
19
20/**
21 * Describes cordvtn node events.
22 */
23public class CordVtnNodeEvent extends AbstractEvent<CordVtnNodeEvent.Type, CordVtnNode> {
24
25 public enum Type {
26
27 /**
28 * Signifies that the new node is created.
29 */
30 NODE_CREATED,
31
32 /**
33 * Signifies that the node is updated.
34 */
35 NODE_UPDATED,
36
37 /**
38 * Signifies that the node is removed.
39 */
40 NODE_REMOVED,
41
42 /**
43 * Signifies that the node state is changed to complete.
44 */
45 NODE_COMPLETE,
46
47 /**
48 * Signifies that the node state is changed to incomplete.
49 */
50 NODE_INCOMPLETE
51 }
52
53 /**
54 * Creates an event of a given type and the specified node.
55 *
56 * @param type cordvtn node event type
57 * @param node cordvtn node subject
58 */
59 public CordVtnNodeEvent(Type type, CordVtnNode node) {
60 super(type, node);
61 }
62}