Search in sources :

Example 1 with DefaultObjectiveContext

use of org.onosproject.net.flowobjective.DefaultObjectiveContext in project onos by opennetworkinglab.

the class FibInstaller method sendFilteringObjective.

private void sendFilteringObjective(boolean install, FilteringObjective.Builder fob, Interface intf) {
    ObjectiveContext context = new DefaultObjectiveContext((objective) -> log.info("Installed filter for interface {}", intf), (objective, error) -> log.error("Failed to install filter for interface {}: {}", intf, error));
    FilteringObjective filter = install ? fob.add(context) : fob.remove(context);
    flowObjectiveService.filter(deviceId, filter);
}
Also used : DefaultObjectiveContext(org.onosproject.net.flowobjective.DefaultObjectiveContext) ObjectiveContext(org.onosproject.net.flowobjective.ObjectiveContext) DefaultObjectiveContext(org.onosproject.net.flowobjective.DefaultObjectiveContext) DefaultFilteringObjective(org.onosproject.net.flowobjective.DefaultFilteringObjective) FilteringObjective(org.onosproject.net.flowobjective.FilteringObjective)

Aggregations

DefaultFilteringObjective (org.onosproject.net.flowobjective.DefaultFilteringObjective)1 DefaultObjectiveContext (org.onosproject.net.flowobjective.DefaultObjectiveContext)1 FilteringObjective (org.onosproject.net.flowobjective.FilteringObjective)1 ObjectiveContext (org.onosproject.net.flowobjective.ObjectiveContext)1