blob: 161ed91c8faecfedafcaac16853bca0b1dee4559 [file] [log] [blame]
Toshio Koidea03915e2014-07-01 18:39:52 -07001package net.onrc.onos.core.matchaction;
2
Toshio Koidea03915e2014-07-01 18:39:52 -07003import java.util.EventListener;
Brian O'Connordee2e6b2014-08-12 11:34:51 -07004import java.util.Set;
Toshio Koidea03915e2014-07-01 18:39:52 -07005
6import net.onrc.onos.api.flowmanager.ConflictDetectionPolicy;
7
8/**
9 * An interface for the match-action service.
10 */
Toshio Koided8b077a2014-08-13 10:47:21 -070011public interface MatchActionService {
Toshio Koidea03915e2014-07-01 18:39:52 -070012 /**
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 /**
Toshio Koidea03915e2014-07-01 18:39:52 -070021 * Gets the set of match-action entries.
22 *
23 * @return The set of match-action entries.
24 */
Brian O'Connordee2e6b2014-08-12 11:34:51 -070025 Set<MatchAction> getMatchActions();
Toshio Koidea03915e2014-07-01 18:39:52 -070026
27 /**
28 * Executes match-action operation plan.
29 *
Brian O'Connordee2e6b2014-08-12 11:34:51 -070030 * @param operations Operations to be executed.
Toshio Koidea03915e2014-07-01 18:39:52 -070031 * @return true if succeeded, false otherwise.
32 */
Brian O'Connordee2e6b2014-08-12 11:34:51 -070033 boolean executeOperations(MatchActionOperations operations);
Toshio Koidea03915e2014-07-01 18:39:52 -070034
35 /**
36 * Sets a conflict detection policy.
37 *
38 * @param policy ConflictDetectionPolicy object to be set.
39 */
40 void setConflictDetectionPolicy(ConflictDetectionPolicy policy);
41
42 /**
43 * Gets the conflict detection policy.
44 *
45 * @return ConflictDetectionPolicy object being applied currently.
46 */
47 ConflictDetectionPolicy getConflictDetectionPolicy();
48
49 /**
Toshio Koide77ec9982014-08-27 16:57:43 -070050 * Gets the ID generator for MatchActionId.
51 *
52 * @return the ID generator for MatchActionId
53 */
54 MatchActionIdGenerator getMatchActionIdGenerator();
55
56 /**
57 * Gets the ID generator for MatchActionOperationsId.
58 *
59 * @return the ID generator for MatchActionOperationsId
60 */
61 MatchActionOperationsIdGenerator getMatchActionOperationsIdGenerator();
62
63 /**
Toshio Koidea03915e2014-07-01 18:39:52 -070064 * Adds event listener to this service.
65 *
66 * @param listener EventListener to be added.
67 */
68 void addEventListener(EventListener listener);
69
70 /**
71 * Removes event listener from this service.
72 *
73 * @param listener EventListener to be removed.
74 */
75 void removeEventListener(EventListener listener);
76}