Bharat saraswal | e37f7f3 | 2015-10-26 15:50:22 +0530 | [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 | */ |
Jonathan Hart | 317f476 | 2015-11-09 16:05:36 -0800 | [diff] [blame] | 16 | package org.onosproject.vtnrsc.flowclassifier; |
Bharat saraswal | e37f7f3 | 2015-10-26 15:50:22 +0530 | [diff] [blame] | 17 | |
| 18 | import org.onosproject.vtnrsc.FlowClassifier; |
| 19 | import org.onosproject.vtnrsc.FlowClassifierId; |
| 20 | |
| 21 | /** |
| 22 | * Provides Services for Flow Classifier. |
| 23 | */ |
| 24 | public interface FlowClassifierService { |
| 25 | |
| 26 | /** |
Mahesh Poojary S | fac0226 | 2015-11-20 19:13:22 +0530 | [diff] [blame^] | 27 | * Check whether Flow Classifier is present based on given Flow Classifier |
| 28 | * Id. |
| 29 | * |
| 30 | * @param id flow classifier identifier |
| 31 | * @return true if flow classifier is present otherwise return false |
| 32 | */ |
| 33 | boolean exists(FlowClassifierId id); |
| 34 | |
| 35 | /** |
| 36 | * Returns the number of flow classifiers known to the system. |
| 37 | * |
| 38 | * @return number of flow classifiers |
| 39 | */ |
| 40 | int getFlowClassifierCount(); |
| 41 | |
| 42 | /** |
Bharat saraswal | e37f7f3 | 2015-10-26 15:50:22 +0530 | [diff] [blame] | 43 | * Store Flow Classifier. |
| 44 | * |
Mahesh Poojary S | fac0226 | 2015-11-20 19:13:22 +0530 | [diff] [blame^] | 45 | * @param flowClassifier flow classifier |
| 46 | * @return true if adding flow classifier into store is success otherwise |
| 47 | * return false |
Bharat saraswal | e37f7f3 | 2015-10-26 15:50:22 +0530 | [diff] [blame] | 48 | */ |
| 49 | boolean createFlowClassifier(FlowClassifier flowClassifier); |
| 50 | |
| 51 | /** |
| 52 | * Return the existing collection of Flow Classifier. |
| 53 | * |
Mahesh Poojary S | fac0226 | 2015-11-20 19:13:22 +0530 | [diff] [blame^] | 54 | * @return flow classifier collections |
Bharat saraswal | e37f7f3 | 2015-10-26 15:50:22 +0530 | [diff] [blame] | 55 | */ |
| 56 | Iterable<FlowClassifier> getFlowClassifiers(); |
| 57 | |
| 58 | /** |
Bharat saraswal | e37f7f3 | 2015-10-26 15:50:22 +0530 | [diff] [blame] | 59 | * Retrieve the Flow Classifier based on given Flow Classifier id. |
| 60 | * |
Mahesh Poojary S | fac0226 | 2015-11-20 19:13:22 +0530 | [diff] [blame^] | 61 | * @param id flow classifier identifier |
| 62 | * @return flow classifier if present otherwise returns null |
Bharat saraswal | e37f7f3 | 2015-10-26 15:50:22 +0530 | [diff] [blame] | 63 | */ |
| 64 | FlowClassifier getFlowClassifier(FlowClassifierId id); |
| 65 | |
| 66 | /** |
| 67 | * Update Flow Classifier based on given Flow Classifier Id. |
| 68 | * |
Mahesh Poojary S | fac0226 | 2015-11-20 19:13:22 +0530 | [diff] [blame^] | 69 | * @param flowClassifier flow classifier |
| 70 | * @return true if flow classifier update is success otherwise return false |
Bharat saraswal | e37f7f3 | 2015-10-26 15:50:22 +0530 | [diff] [blame] | 71 | */ |
| 72 | boolean updateFlowClassifier(FlowClassifier flowClassifier); |
| 73 | |
| 74 | /** |
| 75 | * Remove Flow Classifier from store based on given Flow Classifier Id. |
| 76 | * |
Mahesh Poojary S | fac0226 | 2015-11-20 19:13:22 +0530 | [diff] [blame^] | 77 | * @param id flow classifier identifier |
| 78 | * @return true if flow classifier removal is success otherwise return |
| 79 | * false |
Bharat saraswal | e37f7f3 | 2015-10-26 15:50:22 +0530 | [diff] [blame] | 80 | */ |
| 81 | boolean removeFlowClassifier(FlowClassifierId id); |
Jonathan Hart | 317f476 | 2015-11-09 16:05:36 -0800 | [diff] [blame] | 82 | } |