blob: c4700fc427a19ad37d0c87cfded7a3e1b1986493 [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
18import org.onlab.osgi.ServiceDirectory;
19import org.onosproject.net.DeviceId;
alshabib77b88482015-04-07 15:47:50 -070020import org.onosproject.net.driver.HandlerBehaviour;
alshabibfaa1e362015-04-02 15:01:54 -070021import org.onosproject.net.flowobjective.FilteringObjective;
22import org.onosproject.net.flowobjective.ForwardingObjective;
alshabib77b88482015-04-07 15:47:50 -070023import org.onosproject.net.flowobjective.NextObjective;
alshabibfaa1e362015-04-02 15:01:54 -070024
25import java.util.Collection;
26import java.util.concurrent.Future;
27
28/**
29 * Behaviour for handling various pipelines.
30 */
alshabib77b88482015-04-07 15:47:50 -070031public interface Pipeliner extends HandlerBehaviour {
alshabibfaa1e362015-04-02 15:01:54 -070032
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 *
alshabib77b88482015-04-07 15:47:50 -070044 * @param filteringObjectives the collection of filters
alshabibfaa1e362015-04-02 15:01:54 -070045 * @return a future indicating the success of the operation
46 */
alshabib77b88482015-04-07 15:47:50 -070047 Future<Boolean> filter(Collection<FilteringObjective> filteringObjectives);
alshabibfaa1e362015-04-02 15:01:54 -070048
49 /**
50 * Installs the forwarding rules onto the device.
51 *
alshabib77b88482015-04-07 15:47:50 -070052 * @param forwardObjectives the collection of forwarding objectives
alshabibfaa1e362015-04-02 15:01:54 -070053 * @return a future indicating the success of the operation
54 */
alshabib77b88482015-04-07 15:47:50 -070055 Future<Boolean> forward(Collection<ForwardingObjective> forwardObjectives);
alshabibfaa1e362015-04-02 15:01:54 -070056
alshabib77b88482015-04-07 15:47:50 -070057 /**
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);
alshabibfaa1e362015-04-02 15:01:54 -070064}