added FlowObjectiveService to act as an objective manager between applications and drivers
Change-Id: I4dc44db8bafae8a55b7663895c87b1b08645637f
diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/Pipeliner.java b/core/api/src/main/java/org/onosproject/net/behaviour/Pipeliner.java
index 6d35adf..c4700fc 100644
--- a/core/api/src/main/java/org/onosproject/net/behaviour/Pipeliner.java
+++ b/core/api/src/main/java/org/onosproject/net/behaviour/Pipeliner.java
@@ -17,8 +17,10 @@
import org.onlab.osgi.ServiceDirectory;
import org.onosproject.net.DeviceId;
+import org.onosproject.net.driver.HandlerBehaviour;
import org.onosproject.net.flowobjective.FilteringObjective;
import org.onosproject.net.flowobjective.ForwardingObjective;
+import org.onosproject.net.flowobjective.NextObjective;
import java.util.Collection;
import java.util.concurrent.Future;
@@ -26,7 +28,7 @@
/**
* Behaviour for handling various pipelines.
*/
-public interface Pipeliner {
+public interface Pipeliner extends HandlerBehaviour {
/**
* Injecting the service directory into the driver.
@@ -39,17 +41,24 @@
/**
* Installs the filtering rules onto the device.
*
- * @param filters the collection of filters
+ * @param filteringObjectives the collection of filters
* @return a future indicating the success of the operation
*/
- Future<Boolean> filter(Collection<FilteringObjective> filters);
+ Future<Boolean> filter(Collection<FilteringObjective> filteringObjectives);
/**
* Installs the forwarding rules onto the device.
*
- * @param forwardings the collection of forwarding objectives
+ * @param forwardObjectives the collection of forwarding objectives
* @return a future indicating the success of the operation
*/
- Future<Boolean> forward(Collection<ForwardingObjective> forwardings);
+ Future<Boolean> forward(Collection<ForwardingObjective> forwardObjectives);
+ /**
+ * Installs the next hop elements into the device.
+ *
+ * @param nextObjectives the collection of next objectives
+ * @return a future indicating the success of the operation
+ */
+ Future<Boolean> next(Collection<NextObjective> nextObjectives);
}
diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/FlowObjectiveService.java b/core/api/src/main/java/org/onosproject/net/flowobjective/FlowObjectiveService.java
new file mode 100644
index 0000000..dc5e5e1
--- /dev/null
+++ b/core/api/src/main/java/org/onosproject/net/flowobjective/FlowObjectiveService.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.net.flowobjective;
+
+import org.onosproject.net.DeviceId;
+
+import java.util.Collection;
+import java.util.concurrent.Future;
+
+/**
+ * Created by ash on 07/04/15.
+ */
+public interface FlowObjectiveService {
+
+ Future<Boolean> filter(DeviceId deviceId, Collection<FilteringObjective> filterObjectives);
+
+ Future<Boolean> forward(DeviceId deviceId, Collection<ForwardingObjective> forwardingObjectives);
+
+ Future<Boolean> next(DeviceId deviceId, Collection<NextObjective> nextObjectives);
+
+}