blob: bb29b9d61629bc1a0735922c2fa2432461218353 [file] [log] [blame]
Sithara Punnasseryff114552017-01-10 11:40:55 -08001/*
2 * Copyright 2016-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.onosproject.config;
17
18
19import org.onosproject.config.model.ResourceIdentifier;
20import org.onosproject.event.AbstractEvent;
21
22/**
23 * Describes a DynamicConfig change event.
24 */
25public class DynamicConfigEvent extends AbstractEvent<DynamicConfigEvent.Type, ResourceIdentifier> {
26
27 /**
28 * Type of configuration events.
29 * A configuration instance could be a leaf node or a subtree,
30 * identified by the subject, ResourceIdentifier.
31 */
32 public enum Type {
33 /**
34 * Signifies that a dynamic configuration instance was added.
35 */
36 NODE_ADDED,
37
38 /**
39 * Signifies that dynamic configuration instance was updated.
40 */
41 NODE_UPDATED,
42
43 /**
44 * Signifies that dynamic configuration instance was replaced.
45 */
46 NODE_REPLACED,
47
48 /**
49 * Signifies that dynamic configuration instance was removed.
50 */
51 NODE_DELETED
52 }
53
54 /**
55 * Creates an event of a given type, config node value and config node path.
56 *
57 * @param type config node type
58 * @param path config node path
59 */
60 public DynamicConfigEvent(Type type, ResourceIdentifier path) {
61 super(type, path);
62 }
63}