alshabib | 77b8848 | 2015-04-07 15:47:50 -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.net.flowobjective; |
| 17 | |
| 18 | import org.onosproject.net.DeviceId; |
| 19 | |
alshabib | 77b8848 | 2015-04-07 15:47:50 -0700 | [diff] [blame] | 20 | /** |
Thomas Vachuska | ca88bb7 | 2015-04-08 19:38:02 -0700 | [diff] [blame] | 21 | * Service for programming data plane flow rules in manner independent of |
| 22 | * specific device table pipeline configuration. |
alshabib | 77b8848 | 2015-04-07 15:47:50 -0700 | [diff] [blame] | 23 | */ |
| 24 | public interface FlowObjectiveService { |
| 25 | |
Thomas Vachuska | ca88bb7 | 2015-04-08 19:38:02 -0700 | [diff] [blame] | 26 | /** |
| 27 | * Installs the filtering rules onto the specified device. |
| 28 | * |
| 29 | * @param deviceId device identifier |
alshabib | 2a441c6 | 2015-04-13 18:39:38 -0700 | [diff] [blame] | 30 | * @param filteringObjective the filtering objective |
Thomas Vachuska | ca88bb7 | 2015-04-08 19:38:02 -0700 | [diff] [blame] | 31 | */ |
alshabib | 2a441c6 | 2015-04-13 18:39:38 -0700 | [diff] [blame] | 32 | void filter(DeviceId deviceId, FilteringObjective filteringObjective); |
alshabib | 77b8848 | 2015-04-07 15:47:50 -0700 | [diff] [blame] | 33 | |
Thomas Vachuska | ca88bb7 | 2015-04-08 19:38:02 -0700 | [diff] [blame] | 34 | /** |
| 35 | * Installs the forwarding rules onto the specified device. |
| 36 | * |
| 37 | * @param deviceId device identifier |
alshabib | 2a441c6 | 2015-04-13 18:39:38 -0700 | [diff] [blame] | 38 | * @param forwardingObjective the forwarding objective |
Thomas Vachuska | ca88bb7 | 2015-04-08 19:38:02 -0700 | [diff] [blame] | 39 | */ |
alshabib | 2a441c6 | 2015-04-13 18:39:38 -0700 | [diff] [blame] | 40 | void forward(DeviceId deviceId, ForwardingObjective forwardingObjective); |
alshabib | 77b8848 | 2015-04-07 15:47:50 -0700 | [diff] [blame] | 41 | |
Thomas Vachuska | ca88bb7 | 2015-04-08 19:38:02 -0700 | [diff] [blame] | 42 | /** |
| 43 | * Installs the next hop elements into the specified device. |
| 44 | * |
| 45 | * @param deviceId device identifier |
alshabib | 2a441c6 | 2015-04-13 18:39:38 -0700 | [diff] [blame] | 46 | * @param nextObjective a next objective |
Thomas Vachuska | ca88bb7 | 2015-04-08 19:38:02 -0700 | [diff] [blame] | 47 | */ |
alshabib | 2a441c6 | 2015-04-13 18:39:38 -0700 | [diff] [blame] | 48 | void next(DeviceId deviceId, NextObjective nextObjective); |
alshabib | 77b8848 | 2015-04-07 15:47:50 -0700 | [diff] [blame] | 49 | |
alshabib | f6ea9e6 | 2015-04-21 17:08:26 -0700 | [diff] [blame] | 50 | /** |
| 51 | * Obtains a globally unique next objective. |
| 52 | * @return an integer |
| 53 | */ |
| 54 | int allocateNextId(); |
| 55 | |
alshabib | 77b8848 | 2015-04-07 15:47:50 -0700 | [diff] [blame] | 56 | } |