Anton Chigrin | 4af4f87 | 2019-01-14 17:29:56 +0200 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright 2019-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 | package org.onosproject.openflow.controller; |
| 17 | |
| 18 | import java.util.Set; |
| 19 | import org.onosproject.event.ListenerService; |
| 20 | import org.onosproject.net.DeviceId; |
| 21 | |
| 22 | /** |
| 23 | * Abstraction of an OpenFlow classifiers management. |
| 24 | */ |
| 25 | public interface OpenFlowService extends ListenerService<OpenFlowEvent, OpenFlowListener> { |
| 26 | |
| 27 | /** |
| 28 | * Adds the OpenFlow classifier to the information base. |
| 29 | * |
| 30 | * @param classifier the OpenFlow classifier |
| 31 | */ |
| 32 | void add(OpenFlowClassifier classifier); |
| 33 | |
| 34 | /** |
| 35 | * Removes the OpenFlow classifier from the information base. |
| 36 | * |
| 37 | * @param classifier classifier to remove |
| 38 | */ |
| 39 | void remove(OpenFlowClassifier classifier); |
| 40 | |
| 41 | /** |
| 42 | * Gets all OpenFlow classifiers in the system. |
| 43 | * |
| 44 | * @return set of OpenFlow classifiers |
| 45 | */ |
| 46 | Set<OpenFlowClassifier> getClassifiers(); |
| 47 | |
| 48 | /** |
| 49 | * Obtains OpenFlow classifiers in the system by device id. |
| 50 | * |
| 51 | * @param deviceId the device id |
| 52 | * @return set of OpenFlow classifiers |
| 53 | */ |
| 54 | Set<OpenFlowClassifier> getClassifiersByDeviceId(DeviceId deviceId); |
| 55 | |
| 56 | /** |
| 57 | * Obtains OpenFlow classifiers in the system by device id and number of queue. |
| 58 | * |
| 59 | * @param deviceId the device id |
| 60 | * @param idQueue the queue id |
| 61 | * @return set of OpenFlow classifiers |
| 62 | */ |
| 63 | Set<OpenFlowClassifier> getClassifiersByDeviceIdAndQueue(DeviceId deviceId, int idQueue); |
| 64 | } |