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 | |
| 18 | import org.onlab.osgi.ServiceDirectory; |
| 19 | import org.onosproject.net.DeviceId; |
alshabib | 77b8848 | 2015-04-07 15:47:50 -0700 | [diff] [blame^] | 20 | import org.onosproject.net.driver.HandlerBehaviour; |
alshabib | faa1e36 | 2015-04-02 15:01:54 -0700 | [diff] [blame] | 21 | import org.onosproject.net.flowobjective.FilteringObjective; |
| 22 | import org.onosproject.net.flowobjective.ForwardingObjective; |
alshabib | 77b8848 | 2015-04-07 15:47:50 -0700 | [diff] [blame^] | 23 | import org.onosproject.net.flowobjective.NextObjective; |
alshabib | faa1e36 | 2015-04-02 15:01:54 -0700 | [diff] [blame] | 24 | |
| 25 | import java.util.Collection; |
| 26 | import java.util.concurrent.Future; |
| 27 | |
| 28 | /** |
| 29 | * Behaviour for handling various pipelines. |
| 30 | */ |
alshabib | 77b8848 | 2015-04-07 15:47:50 -0700 | [diff] [blame^] | 31 | public interface Pipeliner extends HandlerBehaviour { |
alshabib | faa1e36 | 2015-04-02 15:01:54 -0700 | [diff] [blame] | 32 | |
| 33 | /** |
| 34 | * Injecting the service directory into the driver. |
| 35 | * |
| 36 | * @param deviceId the deviceId |
| 37 | * @param serviceDirectory the service directory. |
| 38 | */ |
| 39 | void init(DeviceId deviceId, ServiceDirectory serviceDirectory); |
| 40 | |
| 41 | /** |
| 42 | * Installs the filtering rules onto the device. |
| 43 | * |
alshabib | 77b8848 | 2015-04-07 15:47:50 -0700 | [diff] [blame^] | 44 | * @param filteringObjectives the collection of filters |
alshabib | faa1e36 | 2015-04-02 15:01:54 -0700 | [diff] [blame] | 45 | * @return a future indicating the success of the operation |
| 46 | */ |
alshabib | 77b8848 | 2015-04-07 15:47:50 -0700 | [diff] [blame^] | 47 | Future<Boolean> filter(Collection<FilteringObjective> filteringObjectives); |
alshabib | faa1e36 | 2015-04-02 15:01:54 -0700 | [diff] [blame] | 48 | |
| 49 | /** |
| 50 | * Installs the forwarding rules onto the device. |
| 51 | * |
alshabib | 77b8848 | 2015-04-07 15:47:50 -0700 | [diff] [blame^] | 52 | * @param forwardObjectives the collection of forwarding objectives |
alshabib | faa1e36 | 2015-04-02 15:01:54 -0700 | [diff] [blame] | 53 | * @return a future indicating the success of the operation |
| 54 | */ |
alshabib | 77b8848 | 2015-04-07 15:47:50 -0700 | [diff] [blame^] | 55 | Future<Boolean> forward(Collection<ForwardingObjective> forwardObjectives); |
alshabib | faa1e36 | 2015-04-02 15:01:54 -0700 | [diff] [blame] | 56 | |
alshabib | 77b8848 | 2015-04-07 15:47:50 -0700 | [diff] [blame^] | 57 | /** |
| 58 | * Installs the next hop elements into the device. |
| 59 | * |
| 60 | * @param nextObjectives the collection of next objectives |
| 61 | * @return a future indicating the success of the operation |
| 62 | */ |
| 63 | Future<Boolean> next(Collection<NextObjective> nextObjectives); |
alshabib | faa1e36 | 2015-04-02 15:01:54 -0700 | [diff] [blame] | 64 | } |