Brian Stanke | 2b4f32d | 2016-02-03 14:22:10 -0500 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Foundation |
Brian Stanke | 2b4f32d | 2016-02-03 14:22:10 -0500 | [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 | |
Claudine Chiu | 31ad527 | 2016-02-17 20:56:24 +0000 | [diff] [blame] | 17 | package org.onosproject.net.key; |
Brian Stanke | 2b4f32d | 2016-02-03 14:22:10 -0500 | [diff] [blame] | 18 | |
| 19 | import com.google.common.annotations.Beta; |
Brian Stanke | ca93d9a | 2016-02-10 09:17:35 -0500 | [diff] [blame] | 20 | import org.onosproject.event.ListenerService; |
| 21 | |
| 22 | import java.util.Collection; |
Brian Stanke | 2b4f32d | 2016-02-03 14:22:10 -0500 | [diff] [blame] | 23 | |
| 24 | /** |
| 25 | * Service for querying device keys. |
| 26 | */ |
| 27 | @Beta |
Brian Stanke | ca93d9a | 2016-02-10 09:17:35 -0500 | [diff] [blame] | 28 | public interface DeviceKeyService extends ListenerService<DeviceKeyEvent, DeviceKeyListener> { |
Brian Stanke | 2b4f32d | 2016-02-03 14:22:10 -0500 | [diff] [blame] | 29 | |
| 30 | /** |
| 31 | * Returns all device keys. |
| 32 | * |
Brian Stanke | ca93d9a | 2016-02-10 09:17:35 -0500 | [diff] [blame] | 33 | * @return Collection of device keys |
Brian Stanke | 2b4f32d | 2016-02-03 14:22:10 -0500 | [diff] [blame] | 34 | */ |
Brian Stanke | ca93d9a | 2016-02-10 09:17:35 -0500 | [diff] [blame] | 35 | Collection<DeviceKey> getDeviceKeys(); |
Brian Stanke | 2b4f32d | 2016-02-03 14:22:10 -0500 | [diff] [blame] | 36 | |
| 37 | /** |
Brian Stanke | ca93d9a | 2016-02-10 09:17:35 -0500 | [diff] [blame] | 38 | * Returns the device key using a device key identifier. |
Brian Stanke | 2b4f32d | 2016-02-03 14:22:10 -0500 | [diff] [blame] | 39 | * |
Brian Stanke | ca93d9a | 2016-02-10 09:17:35 -0500 | [diff] [blame] | 40 | * @param deviceKeyId device key identifier |
| 41 | * @return device key |
Brian Stanke | 2b4f32d | 2016-02-03 14:22:10 -0500 | [diff] [blame] | 42 | */ |
Brian Stanke | ca93d9a | 2016-02-10 09:17:35 -0500 | [diff] [blame] | 43 | DeviceKey getDeviceKey(DeviceKeyId deviceKeyId); |
Brian Stanke | 2b4f32d | 2016-02-03 14:22:10 -0500 | [diff] [blame] | 44 | } |
| 45 | |