blob: 9b829a56609a7d90de1200e18e5dc8e33ddbfc27 [file] [log] [blame]
Toshio Koidea03915e2014-07-01 18:39:52 -07001package net.onrc.onos.core.matchaction;
2
3import java.util.Collection;
4import java.util.EventListener;
5
6import net.onrc.onos.api.flowmanager.ConflictDetectionPolicy;
7
8/**
9 * An interface for the match-action service.
10 */
11public interface IMatchActionService {
12 /**
13 * Adds a new match-action entry.
14 *
15 * @param matchAction MatchAction object to be added.
16 * @return true if succeeded, false otherwise.
17 */
18 boolean addMatchAction(MatchAction matchAction);
19
20 /**
21 * Removes the existing match-action entry.
22 *
23 * @param id ID for MatchaAction object to be removed.
24 * @return true if succeeded, false otherwise.
25 */
26 boolean removeMatchAction(String id);
27
28 /**
29 * Replaces the existing match-action entry by specified match-action entry.
30 *
31 * @param matchAction MatchAction object which overwrites existing
32 * match-action.
33 * @return true if succeeded, false otherwise.
34 */
35 boolean updateMatchAction(MatchAction matchAction);
36
37 /**
38 * Gets the set of match-action entries.
39 *
40 * @return The set of match-action entries.
41 */
42 Collection<MatchAction> getMatchActions();
43
44 /**
45 * Executes match-action operation plan.
46 *
47 * @param plan MatchActionPlan to be executed.
48 * @return true if succeeded, false otherwise.
49 */
50 boolean executePlan(MatchActionPlan plan);
51
52 /**
53 * Sets a conflict detection policy.
54 *
55 * @param policy ConflictDetectionPolicy object to be set.
56 */
57 void setConflictDetectionPolicy(ConflictDetectionPolicy policy);
58
59 /**
60 * Gets the conflict detection policy.
61 *
62 * @return ConflictDetectionPolicy object being applied currently.
63 */
64 ConflictDetectionPolicy getConflictDetectionPolicy();
65
66 /**
67 * Adds event listener to this service.
68 *
69 * @param listener EventListener to be added.
70 */
71 void addEventListener(EventListener listener);
72
73 /**
74 * Removes event listener from this service.
75 *
76 * @param listener EventListener to be removed.
77 */
78 void removeEventListener(EventListener listener);
79}