blob: eda131aaffab42d8db0efa2fb4c523d61b4abaf4 [file] [log] [blame]
alshabibfaa1e362015-04-02 15:01:54 -07001/*
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 */
16package org.onosproject.net.behaviour;
17
alshabibfaa1e362015-04-02 15:01:54 -070018import org.onosproject.net.DeviceId;
alshabib77b88482015-04-07 15:47:50 -070019import org.onosproject.net.driver.HandlerBehaviour;
alshabibfaa1e362015-04-02 15:01:54 -070020import org.onosproject.net.flowobjective.FilteringObjective;
21import org.onosproject.net.flowobjective.ForwardingObjective;
alshabib77b88482015-04-07 15:47:50 -070022import org.onosproject.net.flowobjective.NextObjective;
alshabibfaa1e362015-04-02 15:01:54 -070023
24import java.util.Collection;
25import java.util.concurrent.Future;
26
27/**
28 * Behaviour for handling various pipelines.
29 */
alshabib77b88482015-04-07 15:47:50 -070030public interface Pipeliner extends HandlerBehaviour {
alshabibfaa1e362015-04-02 15:01:54 -070031
32 /**
Thomas Vachuskaca88bb72015-04-08 19:38:02 -070033 * Initializes the driver with context required for its operation.
alshabibfaa1e362015-04-02 15:01:54 -070034 *
35 * @param deviceId the deviceId
Thomas Vachuskaca88bb72015-04-08 19:38:02 -070036 * @param context processing context
alshabibfaa1e362015-04-02 15:01:54 -070037 */
Thomas Vachuskaca88bb72015-04-08 19:38:02 -070038 void init(DeviceId deviceId, PipelinerContext context);
alshabibfaa1e362015-04-02 15:01:54 -070039
40 /**
41 * Installs the filtering rules onto the device.
42 *
Thomas Vachuskaca88bb72015-04-08 19:38:02 -070043 * @param filterObjectives the collection of filters
alshabibfaa1e362015-04-02 15:01:54 -070044 * @return a future indicating the success of the operation
45 */
Thomas Vachuskaca88bb72015-04-08 19:38:02 -070046 Future<Boolean> filter(Collection<FilteringObjective> filterObjectives);
alshabibfaa1e362015-04-02 15:01:54 -070047
48 /**
49 * Installs the forwarding rules onto the device.
50 *
alshabib77b88482015-04-07 15:47:50 -070051 * @param forwardObjectives the collection of forwarding objectives
alshabibfaa1e362015-04-02 15:01:54 -070052 * @return a future indicating the success of the operation
53 */
alshabib77b88482015-04-07 15:47:50 -070054 Future<Boolean> forward(Collection<ForwardingObjective> forwardObjectives);
alshabibfaa1e362015-04-02 15:01:54 -070055
alshabib77b88482015-04-07 15:47:50 -070056 /**
57 * Installs the next hop elements into the device.
58 *
59 * @param nextObjectives the collection of next objectives
60 * @return a future indicating the success of the operation
61 */
62 Future<Boolean> next(Collection<NextObjective> nextObjectives);
alshabibfaa1e362015-04-02 15:01:54 -070063}