Jian Li | b9fe349 | 2018-06-07 17:19:07 +0900 | [diff] [blame] | 1 | /* |
| 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 | */ |
| 16 | package org.onosproject.openstacktelemetry.api; |
| 17 | |
Jian Li | 69600e0 | 2018-12-24 13:21:18 +0900 | [diff] [blame^] | 18 | import org.onosproject.event.ListenerService; |
Jian Li | b9fe349 | 2018-06-07 17:19:07 +0900 | [diff] [blame] | 19 | import org.onosproject.openstacktelemetry.api.config.TelemetryConfig; |
Jian Li | 69600e0 | 2018-12-24 13:21:18 +0900 | [diff] [blame^] | 20 | import org.onosproject.openstacktelemetry.api.config.TelemetryConfig.ConfigType; |
| 21 | |
| 22 | import java.util.Set; |
Jian Li | b9fe349 | 2018-06-07 17:19:07 +0900 | [diff] [blame] | 23 | |
Jian Li | ae3fcff | 2018-07-30 11:55:44 +0900 | [diff] [blame] | 24 | /** |
| 25 | * Telemetry configuration service interface. |
| 26 | */ |
Jian Li | 69600e0 | 2018-12-24 13:21:18 +0900 | [diff] [blame^] | 27 | public interface TelemetryConfigService |
| 28 | extends ListenerService<TelemetryConfigEvent, TelemetryConfigListener> { |
Jian Li | b9fe349 | 2018-06-07 17:19:07 +0900 | [diff] [blame] | 29 | |
| 30 | /** |
Jian Li | 69600e0 | 2018-12-24 13:21:18 +0900 | [diff] [blame^] | 31 | * Obtains the telemetry configuration with the given telemetry |
| 32 | * configuration name. |
Jian Li | b9fe349 | 2018-06-07 17:19:07 +0900 | [diff] [blame] | 33 | * |
Jian Li | 69600e0 | 2018-12-24 13:21:18 +0900 | [diff] [blame^] | 34 | * @param name telemetry configuration name |
| 35 | * @return provided telemetry configuration |
Jian Li | b9fe349 | 2018-06-07 17:19:07 +0900 | [diff] [blame] | 36 | */ |
Jian Li | 69600e0 | 2018-12-24 13:21:18 +0900 | [diff] [blame^] | 37 | TelemetryConfig getConfig(String name); |
| 38 | |
| 39 | /** |
| 40 | * Obtains the telemetry configuration with the given telemetry config type. |
| 41 | * |
| 42 | * @param type telemetry configuration type |
| 43 | * @return provided telemetry configurations |
| 44 | */ |
| 45 | Set<TelemetryConfig> getConfigsByType(ConfigType type); |
| 46 | |
| 47 | /** |
| 48 | * Returns the overall set of telemetry configurations being provided. |
| 49 | * |
| 50 | * @return provided telemetry configurations |
| 51 | */ |
| 52 | Set<TelemetryConfig> getConfigs(); |
Jian Li | b9fe349 | 2018-06-07 17:19:07 +0900 | [diff] [blame] | 53 | } |