blob: 1f516bf9e2097d43f08cefb97dfabd7af6b49edc [file] [log] [blame]
Hongtao Yin142b7582015-01-21 14:41:30 -08001/*
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.flowext;
17
18import org.onosproject.net.flow.FlowRuleBatchEvent;
19import org.onosproject.net.flow.FlowRuleBatchRequest;
20
21import java.util.concurrent.Future;
22
23/**
24 * Experimental extension to the flow rule subsystem; still under development.
25 * Represents a router-like mechanism which is in charge of sending flow rule to master;
26 * <p>
27 * The Router is in charge of sending flow rule to master;
28 * the core component of routing-like mechanism.
29 * </p>
30 */
31public interface FlowRuleExtRouter {
32
33 /**
34 * apply the sub batch of flow extension rules.
35 *
36 * @param batchOperation batch of flow rules.
37 * A batch can contain flow rules for a single device only.
38 * @return Future response indicating success/failure of the batch operation
39 * all the way down to the device.
40 */
41 Future<FlowExtCompletedOperation> applySubBatch(FlowRuleBatchRequest batchOperation);
42
43 /**
44 * Invoked on the completion of a storeBatch operation.
45 *
46 * @param event flow rule batch event
47 */
48 void batchOperationComplete(FlowRuleBatchEvent event);
49
50 /**
51 * Register the listener to monitor Router,
52 * The Router find master to send downStream.
53 *
54 * @param listener the listener to register
55 */
56 public void addListener(FlowRuleExtRouterListener listener);
57
58 /**
59 * Remove the listener of Router.
60 *
61 * @param listener the listener to remove
62 */
63 public void removeListener(FlowRuleExtRouterListener listener);
64}