blob: dcfc5883a180fc7d42b4e3f48c0e73384c6cedbb [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
alshabibfaa1e362015-04-02 15:01:54 -070024/**
25 * Behaviour for handling various pipelines.
26 */
alshabib77b88482015-04-07 15:47:50 -070027public interface Pipeliner extends HandlerBehaviour {
alshabibfaa1e362015-04-02 15:01:54 -070028
29 /**
Thomas Vachuskaca88bb72015-04-08 19:38:02 -070030 * Initializes the driver with context required for its operation.
alshabibfaa1e362015-04-02 15:01:54 -070031 *
32 * @param deviceId the deviceId
Thomas Vachuskaca88bb72015-04-08 19:38:02 -070033 * @param context processing context
alshabibfaa1e362015-04-02 15:01:54 -070034 */
Thomas Vachuskaca88bb72015-04-08 19:38:02 -070035 void init(DeviceId deviceId, PipelinerContext context);
alshabibfaa1e362015-04-02 15:01:54 -070036
37 /**
38 * Installs the filtering rules onto the device.
39 *
alshabib2a441c62015-04-13 18:39:38 -070040 * @param filterObjective a filtering objective
alshabibfaa1e362015-04-02 15:01:54 -070041 */
alshabib2a441c62015-04-13 18:39:38 -070042 void filter(FilteringObjective filterObjective);
alshabibfaa1e362015-04-02 15:01:54 -070043
44 /**
45 * Installs the forwarding rules onto the device.
46 *
alshabib2a441c62015-04-13 18:39:38 -070047 * @param forwardObjective a forwarding objective
alshabibfaa1e362015-04-02 15:01:54 -070048 */
alshabib2a441c62015-04-13 18:39:38 -070049 void forward(ForwardingObjective forwardObjective);
alshabibfaa1e362015-04-02 15:01:54 -070050
alshabib77b88482015-04-07 15:47:50 -070051 /**
52 * Installs the next hop elements into the device.
53 *
alshabib2a441c62015-04-13 18:39:38 -070054 * @param nextObjective a next objectives
alshabib77b88482015-04-07 15:47:50 -070055 */
alshabib2a441c62015-04-13 18:39:38 -070056 void next(NextObjective nextObjective);
alshabibfaa1e362015-04-02 15:01:54 -070057}