blob: 6d35adfc588502270fe2ad6d4f0b346fdd9295fc [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;
20import org.onosproject.net.flowobjective.FilteringObjective;
21import org.onosproject.net.flowobjective.ForwardingObjective;
22
23import java.util.Collection;
24import java.util.concurrent.Future;
25
26/**
27 * Behaviour for handling various pipelines.
28 */
29public interface Pipeliner {
30
31 /**
32 * Injecting the service directory into the driver.
33 *
34 * @param deviceId the deviceId
35 * @param serviceDirectory the service directory.
36 */
37 void init(DeviceId deviceId, ServiceDirectory serviceDirectory);
38
39 /**
40 * Installs the filtering rules onto the device.
41 *
42 * @param filters the collection of filters
43 * @return a future indicating the success of the operation
44 */
45 Future<Boolean> filter(Collection<FilteringObjective> filters);
46
47 /**
48 * Installs the forwarding rules onto the device.
49 *
50 * @param forwardings the collection of forwarding objectives
51 * @return a future indicating the success of the operation
52 */
53 Future<Boolean> forward(Collection<ForwardingObjective> forwardings);
54
55}