blob: a1ca35e45795c3eff59e175676812d5ef373a3bb [file] [log] [blame]
Toshio Koidea03915e2014-07-01 18:39:52 -07001package net.onrc.onos.core.flowmanager;
2
3import java.util.Collection;
4import java.util.EventListener;
5
6import net.onrc.onos.api.batchoperation.BatchOperation;
7import net.onrc.onos.api.flowmanager.ConflictDetectionPolicy;
8import net.onrc.onos.api.flowmanager.IFlow;
9import net.onrc.onos.api.flowmanager.IFlowManagerService;
10
11/**
12 * Manages a set of IFlow objects, computes and maintains a set of Match-Action
13 * entries based on the IFlow objects, and executes Match-Action plans.
14 * <p>
15 * TODO: Make all methods thread-safe
16 */
17public class FlowManagerModule implements IFlowManagerService {
18 @Override
19 public boolean addFlow(IFlow flow) {
20 BatchOperation<IFlow> ops = new BatchOperation<IFlow>();
21 ops.addAddOperation(flow);
22 return executeBatch(ops);
23 }
24
25 @Override
26 public boolean removeFlow(String id) {
27 BatchOperation<IFlow> ops = new BatchOperation<IFlow>();
28 ops.addRemoveOperation(id);
29 return executeBatch(ops);
30 }
31
32 @Override
33 public boolean updateFlow(IFlow flow) {
34 BatchOperation<IFlow> ops = new BatchOperation<IFlow>();
35 ops.addUpdateOperation(flow.getId(), flow);
36 return executeBatch(ops);
37 }
38
39 @Override
40 public IFlow getFlow(String id) {
41 // TODO Auto-generated method stub
42 return null;
43 }
44
45 @Override
46 public Collection<IFlow> getFlows() {
47 // TODO Auto-generated method stub
48 return null;
49 }
50
51 @Override
52 public boolean executeBatch(BatchOperation<IFlow> ops) {
53 // TODO Auto-generated method stub
54 return false;
55 }
56
57 @Override
58 public void setConflictDetectionPolicy(ConflictDetectionPolicy policy) {
59 // TODO Auto-generated method stub
60
61 }
62
63 @Override
64 public ConflictDetectionPolicy getConflictDetectionPolicy() {
65 // TODO Auto-generated method stub
66 return null;
67 }
68
69 @Override
70 public void addEventListener(EventListener listener) {
71 // TODO Auto-generated method stub
72
73 }
74
75 @Override
76 public void removeEventListener(EventListener listener) {
77 // TODO Auto-generated method stub
78
79 }
80}