Jonathan Hart | 2b5ceec | 2017-12-04 13:57:19 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016-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 | |
| 17 | package org.opencord.cordconfig; |
| 18 | |
| 19 | import org.onosproject.event.ListenerService; |
| 20 | import org.onosproject.net.DeviceId; |
| 21 | import org.opencord.cordconfig.access.AccessAgentData; |
| 22 | import org.opencord.cordconfig.access.AccessDeviceData; |
| 23 | |
| 24 | import java.util.Optional; |
| 25 | import java.util.Set; |
| 26 | |
| 27 | /** |
| 28 | * Provides access to the common CORD configuration. |
| 29 | */ |
| 30 | public interface CordConfigService |
| 31 | extends ListenerService<CordConfigEvent, CordConfigListener> { |
| 32 | |
| 33 | /** |
| 34 | * Retrieves the set of all access devices in the system. |
| 35 | * |
| 36 | * @return set of access devices |
| 37 | */ |
| 38 | Set<AccessDeviceData> getAccessDevices(); |
| 39 | |
| 40 | /** |
| 41 | * Retrieves the access device with the given device ID. |
| 42 | * |
| 43 | * @param deviceId device ID |
| 44 | * @return access device |
| 45 | */ |
| 46 | Optional<AccessDeviceData> getAccessDevice(DeviceId deviceId); |
| 47 | |
| 48 | /** |
| 49 | * Retrieves the set of all access agents in the system. |
| 50 | * |
| 51 | * @return set of access agents |
| 52 | */ |
| 53 | Set<AccessAgentData> getAccessAgents(); |
| 54 | |
| 55 | /** |
| 56 | * Retrieves the access agent for the given device ID. |
| 57 | * |
| 58 | * @param deviceId device ID |
| 59 | * @return access agent |
| 60 | */ |
| 61 | Optional<AccessAgentData> getAccessAgent(DeviceId deviceId); |
| 62 | } |