Brian O'Connor | b7baf71 | 2015-07-28 23:27:03 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright 2015 Open Networking Laboratory |
| 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.incubator.net.domain; |
| 17 | |
| 18 | import com.google.common.annotations.Beta; |
| 19 | import org.onlab.graph.Graph; |
| 20 | import org.onosproject.net.DeviceId; |
| 21 | |
| 22 | import java.util.Set; |
| 23 | |
| 24 | /** |
| 25 | * Service for that maintains a graph of intent domains and a registry of intent |
| 26 | * domain providers. |
| 27 | */ |
| 28 | @Beta |
| 29 | public interface IntentDomainService { |
| 30 | |
| 31 | /** |
| 32 | * Returns the intent domain for the given id. |
| 33 | * |
| 34 | * @param id id to look up |
| 35 | * @return the intent domain; null if none found |
| 36 | */ |
| 37 | IntentDomain getDomain(IntentDomainId id); |
| 38 | |
| 39 | /** |
| 40 | * Returns a set of all intent domains. |
| 41 | * |
| 42 | * @return set of intent domains |
| 43 | */ |
| 44 | Set<IntentDomain> getDomains(); |
| 45 | |
| 46 | /** |
| 47 | * Returns any network domains associated with the given device id. |
| 48 | * |
| 49 | * @param deviceId device id to look up |
| 50 | * @return set of intent domain |
| 51 | */ |
| 52 | Set<IntentDomain> getDomains(DeviceId deviceId); |
| 53 | |
| 54 | /** |
| 55 | * Returns the graph of intent domains and connection devices. |
| 56 | * |
| 57 | * @return graph of network domains |
| 58 | */ |
| 59 | Graph<DomainVertex, DomainEdge> getDomainGraph(); |
| 60 | |
| 61 | /** |
| 62 | * Adds the specified listener for intent domain events. |
| 63 | * |
| 64 | * @param listener listener to be added |
| 65 | */ |
| 66 | void addListener(IntentDomainListener listener); |
| 67 | |
| 68 | /** |
| 69 | * Removes the specified listener for intent domain events. |
| 70 | * |
| 71 | * @param listener listener to be removed |
| 72 | */ |
| 73 | void removeListener(IntentDomainListener listener); |
| 74 | } |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |