blob: 956caab38d09aea403f004e8ab39341319ff728b [file] [log] [blame]
Pavlin Radoslavov9e5344c2013-02-18 09:58:30 -08001package net.floodlightcontroller.flowcache;
2
3import java.util.ArrayList;
4
5import net.floodlightcontroller.core.module.IFloodlightService;
6import net.floodlightcontroller.util.CallerId;
7import net.floodlightcontroller.util.DataPathEndpoints;
8import net.floodlightcontroller.util.FlowId;
9import net.floodlightcontroller.util.FlowPath;
10
11/**
12 * @short Interface for providing Flow Service to other modules.
13 */
14public interface IFlowService extends IFloodlightService {
15 /**
16 * Add a flow.
17 *
18 * Internally, ONOS will automatically register the installer for
19 * receiving Flow Path Notifications for that path.
20 *
21 * @param flowPath the Flow Path to install.
22 * @param flowId the return-by-reference Flow ID as assigned internally.
23 * @return true on success, otherwise false.
24 */
25 boolean addFlow(FlowPath flowPath, FlowId flowId);
26
27 /**
28 * Delete a previously added flow.
29 *
30 * @param flowId the Flow ID of the flow to delete.
31 * @return true on success, otherwise false.
32 */
33 boolean deleteFlow(FlowId flowId);
34
35 /**
36 * Get a previously added flow.
37 *
38 * @param flowId the Flow ID of the flow to get.
39 * @param flowPath the return-by-reference flow path.
40 * @return true on success, otherwise false.
41 */
42 boolean getFlow(FlowId flowId, FlowPath flowPath);
43
44 /**
45 * Get a previously added flow by a specific installer for given
46 * data path endpoints.
47 *
48 * @param installerId the Caller ID of the installer of the flow to get.
49 * @param dataPathEndpoints the data path endpoints of the flow to get.
50 * @param flowPath the return-by-reference flow path.
51 * @return true on success, otherwise false.
52 */
53 boolean getFlow(CallerId installerId,
54 DataPathEndpoints dataPathEndpoints,
55 FlowPath flowPath);
56
57 /**
58 * Get all installed flows by all installers for given data path endpoints.
59 *
60 * @param dataPathEndpoints the data path endpoints of the flows to get.
61 * @param flowPaths the return-by-reference list of flows.
62 */
63 void getAllFlows(DataPathEndpoints dataPathEndpoints,
64 ArrayList<FlowPath> flowPaths);
65
66 /**
67 * Get all installed flows by all installers.
68 *
69 * @param flowPaths the return-by-reference list of flows.
70 */
71 void getAllFlows(ArrayList<FlowPath> flowPaths);
72}