blob: a0c2714a112c368d6f10dbcae1c4c6de7a58d7c0 [file] [log] [blame]
Jian Li69600e02018-12-24 13:21:18 +09001/*
2 * Copyright 2018-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 */
16package org.onosproject.openstacktelemetry.api;
17
18import org.onosproject.event.AbstractEvent;
19import org.onosproject.openstacktelemetry.api.config.TelemetryConfig;
20
21/**
22 * Describes telemetry config event.
23 */
24public class TelemetryConfigEvent extends AbstractEvent<TelemetryConfigEvent.Type, TelemetryConfig> {
25
26 /**
27 * Telemetry config event type.
28 */
29 public enum Type {
30 /**
31 * Signifies that a new telemetry config is added.
32 */
33 CONFIG_ADDED,
34 /**
35 * Signifies that an existing telemetry config is updated.
36 */
37 CONFIG_UPDATED,
38 /**
39 * Signifies that an existing telemetry config is removed.
40 */
41 CONFIG_DELETED
42 }
43
44 /**
45 * Creates an event of a given type for the specified telemetry config.
46 *
47 * @param type telemetry config type
48 * @param config telemetry config
49 */
50 public TelemetryConfigEvent(Type type, TelemetryConfig config) {
51 super(type, config);
52 }
53}