blob: 9a87da9d6d3975d86cb6d16aa3da072815c7aae9 [file] [log] [blame]
package net.onrc.onos.core.matchaction;
import java.util.Collection;
import java.util.EventListener;
import net.onrc.onos.api.flowmanager.ConflictDetectionPolicy;
/**
* An interface for the match-action service.
*/
public interface IMatchActionService {
/**
* Adds a new match-action entry.
*
* @param matchAction MatchAction object to be added.
* @return true if succeeded, false otherwise.
*/
boolean addMatchAction(MatchAction matchAction);
/**
* Removes the existing match-action entry.
*
* @param id ID for MatchaAction object to be removed.
* @return true if succeeded, false otherwise.
*/
boolean removeMatchAction(MatchActionId id);
/**
* Replaces the existing match-action entry by specified match-action entry.
*
* @param matchAction MatchAction object which overwrites existing
* match-action.
* @return true if succeeded, false otherwise.
*/
boolean updateMatchAction(MatchAction matchAction);
/**
* Gets the set of match-action entries.
*
* @return The set of match-action entries.
*/
Collection<MatchAction> getMatchActions();
/**
* Executes match-action operation plan.
*
* @param plan MatchActionPlan to be executed.
* @return true if succeeded, false otherwise.
*/
boolean executePlan(MatchActionPlan plan);
/**
* Sets a conflict detection policy.
*
* @param policy ConflictDetectionPolicy object to be set.
*/
void setConflictDetectionPolicy(ConflictDetectionPolicy policy);
/**
* Gets the conflict detection policy.
*
* @return ConflictDetectionPolicy object being applied currently.
*/
ConflictDetectionPolicy getConflictDetectionPolicy();
/**
* Adds event listener to this service.
*
* @param listener EventListener to be added.
*/
void addEventListener(EventListener listener);
/**
* Removes event listener from this service.
*
* @param listener EventListener to be removed.
*/
void removeEventListener(EventListener listener);
}