alshabib | faa1e36 | 2015-04-02 15:01:54 -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.behaviour; |
| 17 | |
alshabib | faa1e36 | 2015-04-02 15:01:54 -0700 | [diff] [blame] | 18 | import org.onosproject.net.DeviceId; |
alshabib | 77b8848 | 2015-04-07 15:47:50 -0700 | [diff] [blame] | 19 | import org.onosproject.net.driver.HandlerBehaviour; |
alshabib | faa1e36 | 2015-04-02 15:01:54 -0700 | [diff] [blame] | 20 | import org.onosproject.net.flowobjective.FilteringObjective; |
| 21 | import org.onosproject.net.flowobjective.ForwardingObjective; |
alshabib | 77b8848 | 2015-04-07 15:47:50 -0700 | [diff] [blame] | 22 | import org.onosproject.net.flowobjective.NextObjective; |
alshabib | faa1e36 | 2015-04-02 15:01:54 -0700 | [diff] [blame] | 23 | |
alshabib | faa1e36 | 2015-04-02 15:01:54 -0700 | [diff] [blame] | 24 | /** |
| 25 | * Behaviour for handling various pipelines. |
| 26 | */ |
alshabib | 77b8848 | 2015-04-07 15:47:50 -0700 | [diff] [blame] | 27 | public interface Pipeliner extends HandlerBehaviour { |
alshabib | faa1e36 | 2015-04-02 15:01:54 -0700 | [diff] [blame] | 28 | |
| 29 | /** |
Thomas Vachuska | ca88bb7 | 2015-04-08 19:38:02 -0700 | [diff] [blame] | 30 | * Initializes the driver with context required for its operation. |
alshabib | faa1e36 | 2015-04-02 15:01:54 -0700 | [diff] [blame] | 31 | * |
| 32 | * @param deviceId the deviceId |
Thomas Vachuska | ca88bb7 | 2015-04-08 19:38:02 -0700 | [diff] [blame] | 33 | * @param context processing context |
alshabib | faa1e36 | 2015-04-02 15:01:54 -0700 | [diff] [blame] | 34 | */ |
Thomas Vachuska | ca88bb7 | 2015-04-08 19:38:02 -0700 | [diff] [blame] | 35 | void init(DeviceId deviceId, PipelinerContext context); |
alshabib | faa1e36 | 2015-04-02 15:01:54 -0700 | [diff] [blame] | 36 | |
| 37 | /** |
| 38 | * Installs the filtering rules onto the device. |
| 39 | * |
alshabib | 2a441c6 | 2015-04-13 18:39:38 -0700 | [diff] [blame] | 40 | * @param filterObjective a filtering objective |
alshabib | faa1e36 | 2015-04-02 15:01:54 -0700 | [diff] [blame] | 41 | */ |
alshabib | 2a441c6 | 2015-04-13 18:39:38 -0700 | [diff] [blame] | 42 | void filter(FilteringObjective filterObjective); |
alshabib | faa1e36 | 2015-04-02 15:01:54 -0700 | [diff] [blame] | 43 | |
| 44 | /** |
| 45 | * Installs the forwarding rules onto the device. |
| 46 | * |
alshabib | 2a441c6 | 2015-04-13 18:39:38 -0700 | [diff] [blame] | 47 | * @param forwardObjective a forwarding objective |
alshabib | faa1e36 | 2015-04-02 15:01:54 -0700 | [diff] [blame] | 48 | */ |
alshabib | 2a441c6 | 2015-04-13 18:39:38 -0700 | [diff] [blame] | 49 | void forward(ForwardingObjective forwardObjective); |
alshabib | faa1e36 | 2015-04-02 15:01:54 -0700 | [diff] [blame] | 50 | |
alshabib | 77b8848 | 2015-04-07 15:47:50 -0700 | [diff] [blame] | 51 | /** |
| 52 | * Installs the next hop elements into the device. |
| 53 | * |
alshabib | 2a441c6 | 2015-04-13 18:39:38 -0700 | [diff] [blame] | 54 | * @param nextObjective a next objectives |
alshabib | 77b8848 | 2015-04-07 15:47:50 -0700 | [diff] [blame] | 55 | */ |
alshabib | 2a441c6 | 2015-04-13 18:39:38 -0700 | [diff] [blame] | 56 | void next(NextObjective nextObjective); |
alshabib | faa1e36 | 2015-04-02 15:01:54 -0700 | [diff] [blame] | 57 | } |