helenyrwu | 4570084 | 2016-06-09 12:01:30 -0700 | [diff] [blame] | 1 | /* |
Thomas Vachuska | 52f2cd1 | 2018-11-08 21:20:04 -0800 | [diff] [blame] | 2 | * Copyright 2018-present Open Networking Foundation |
helenyrwu | 4570084 | 2016-06-09 12:01:30 -0700 | [diff] [blame] | 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 | |
Thomas Vachuska | 52f2cd1 | 2018-11-08 21:20:04 -0800 | [diff] [blame] | 17 | package org.onosproject.alarm; |
helenyrwu | 4570084 | 2016-06-09 12:01:30 -0700 | [diff] [blame] | 18 | |
| 19 | import org.onosproject.net.DeviceId; |
| 20 | |
| 21 | import java.io.InputStream; |
| 22 | import java.util.Collection; |
| 23 | |
| 24 | /** |
| 25 | * Abstraction of ability to translate device messages into alarms. |
| 26 | */ |
| 27 | public interface AlarmTranslator { |
| 28 | |
| 29 | /** |
| 30 | * Translates message from device into an alarm with appropriate |
| 31 | * information. |
| 32 | * |
Ray Milkey | bb23e0b | 2016-08-02 17:00:21 -0700 | [diff] [blame] | 33 | * @param deviceId device |
helenyrwu | 4570084 | 2016-06-09 12:01:30 -0700 | [diff] [blame] | 34 | * @param message message from device to translate to alarm |
| 35 | * @return Alarm with information determined by given message |
| 36 | */ |
| 37 | Collection<Alarm> translateToAlarm(DeviceId deviceId, InputStream message); |
| 38 | } |