aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/apps/vtn
diff options
context:
space:
mode:
authorAshlee Young <ashlee@wildernessvoice.com>2015-12-08 11:32:02 -0800
committerAshlee Young <ashlee@wildernessvoice.com>2015-12-08 11:32:02 -0800
commitf9da5db0ff14879e47a6d83244ba63d45b4d432d (patch)
tree30ae7124d2650f556252245ffd3c68ae1b7d845f /framework/src/onos/apps/vtn
parent76dc892491948adae5e5e62cf94448967e8d865b (diff)
onos-1.4.0-rc1 tag
Change-Id: I7f6b85bbf2574b9e174ad919ff36acde28ca50a1 Signed-off-by: Ashlee Young <ashlee@wildernessvoice.com>
Diffstat (limited to 'framework/src/onos/apps/vtn')
-rw-r--r--framework/src/onos/apps/vtn/app/pom.xml2
-rw-r--r--framework/src/onos/apps/vtn/pom.xml2
-rw-r--r--framework/src/onos/apps/vtn/sfcmgr/pom.xml2
-rw-r--r--framework/src/onos/apps/vtn/vtnmgr/pom.xml2
-rw-r--r--framework/src/onos/apps/vtn/vtnrsc/pom.xml2
-rw-r--r--framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/flowclassifier/FlowClassifierService.java17
-rw-r--r--framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/flowclassifier/impl/FlowClassifierManager.java23
-rw-r--r--framework/src/onos/apps/vtn/vtnweb/pom.xml2
8 files changed, 39 insertions, 13 deletions
diff --git a/framework/src/onos/apps/vtn/app/pom.xml b/framework/src/onos/apps/vtn/app/pom.xml
index 5a877363..93d2d95c 100644
--- a/framework/src/onos/apps/vtn/app/pom.xml
+++ b/framework/src/onos/apps/vtn/app/pom.xml
@@ -14,7 +14,7 @@
<parent>
<groupId>org.onosproject</groupId>
<artifactId>onos-app-vtn</artifactId>
- <version>1.4.0-SNAPSHOT</version>
+ <version>1.4.0-rc1</version>
<relativePath>../pom.xml</relativePath>
</parent>
diff --git a/framework/src/onos/apps/vtn/pom.xml b/framework/src/onos/apps/vtn/pom.xml
index e4528517..8bbd2657 100644
--- a/framework/src/onos/apps/vtn/pom.xml
+++ b/framework/src/onos/apps/vtn/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.onosproject</groupId>
<artifactId>onos-apps</artifactId>
- <version>1.4.0-SNAPSHOT</version>
+ <version>1.4.0-rc1</version>
<relativePath>../pom.xml</relativePath>
</parent>
diff --git a/framework/src/onos/apps/vtn/sfcmgr/pom.xml b/framework/src/onos/apps/vtn/sfcmgr/pom.xml
index 8b5f1983..bac0cc36 100644
--- a/framework/src/onos/apps/vtn/sfcmgr/pom.xml
+++ b/framework/src/onos/apps/vtn/sfcmgr/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.onosproject</groupId>
<artifactId>onos-app-vtn</artifactId>
- <version>1.4.0-SNAPSHOT</version>
+ <version>1.4.0-rc1</version>
<relativePath>../pom.xml</relativePath>
</parent>
diff --git a/framework/src/onos/apps/vtn/vtnmgr/pom.xml b/framework/src/onos/apps/vtn/vtnmgr/pom.xml
index 03e66708..890b2168 100644
--- a/framework/src/onos/apps/vtn/vtnmgr/pom.xml
+++ b/framework/src/onos/apps/vtn/vtnmgr/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.onosproject</groupId>
<artifactId>onos-app-vtn</artifactId>
- <version>1.4.0-SNAPSHOT</version>
+ <version>1.4.0-rc1</version>
<relativePath>../pom.xml</relativePath>
</parent>
diff --git a/framework/src/onos/apps/vtn/vtnrsc/pom.xml b/framework/src/onos/apps/vtn/vtnrsc/pom.xml
index 816624cb..a2905909 100644
--- a/framework/src/onos/apps/vtn/vtnrsc/pom.xml
+++ b/framework/src/onos/apps/vtn/vtnrsc/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.onosproject</groupId>
<artifactId>onos-app-vtn</artifactId>
- <version>1.4.0-SNAPSHOT</version>
+ <version>1.4.0-rc1</version>
<relativePath>../pom.xml</relativePath>
</parent>
diff --git a/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/flowclassifier/FlowClassifierService.java b/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/flowclassifier/FlowClassifierService.java
index 48438846..e3cbf9ac 100644
--- a/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/flowclassifier/FlowClassifierService.java
+++ b/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/flowclassifier/FlowClassifierService.java
@@ -15,14 +15,13 @@
*/
package org.onosproject.vtnrsc.flowclassifier;
-import org.onosproject.event.ListenerService;
import org.onosproject.vtnrsc.FlowClassifier;
import org.onosproject.vtnrsc.FlowClassifierId;
/**
* Provides Services for Flow Classifier.
*/
-public interface FlowClassifierService extends ListenerService<FlowClassifierEvent, FlowClassifierListener> {
+public interface FlowClassifierService {
/**
* Check whether Flow Classifier is present based on given Flow Classifier
@@ -80,4 +79,18 @@ public interface FlowClassifierService extends ListenerService<FlowClassifierEve
* false
*/
boolean removeFlowClassifier(FlowClassifierId id);
+
+ /**
+ * Adds the specified listener to Flow-Classifier manager.
+ *
+ * @param listener Flow-Classifier listener
+ */
+ void addListener(FlowClassifierListener listener);
+
+ /**
+ * Removes the specified listener to Flow-Classifier manager.
+ *
+ * @param listener Flow-Classifier listener
+ */
+ void removeListener(FlowClassifierListener listener);
}
diff --git a/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/flowclassifier/impl/FlowClassifierManager.java b/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/flowclassifier/impl/FlowClassifierManager.java
index 18f63b30..b29dc7a3 100644
--- a/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/flowclassifier/impl/FlowClassifierManager.java
+++ b/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/flowclassifier/impl/FlowClassifierManager.java
@@ -25,7 +25,6 @@ import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.ReferenceCardinality;
import org.apache.felix.scr.annotations.Service;
import org.onlab.util.KryoNamespace;
-import org.onosproject.event.AbstractListenerManager;
import org.onosproject.store.serializers.KryoNamespaces;
import org.onosproject.store.service.EventuallyConsistentMap;
import org.onosproject.store.service.MultiValuedTimestamp;
@@ -33,27 +32,28 @@ import org.onosproject.store.service.StorageService;
import org.onosproject.store.service.WallClockTimestamp;
import org.onosproject.vtnrsc.FlowClassifierId;
import org.onosproject.vtnrsc.FlowClassifier;
-import org.onosproject.vtnrsc.flowclassifier.FlowClassifierEvent;
import org.onosproject.vtnrsc.flowclassifier.FlowClassifierListener;
import org.onosproject.vtnrsc.flowclassifier.FlowClassifierService;
import org.slf4j.Logger;
+import java.util.Set;
+
import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Sets;
/**
* Provides implementation of the Flow Classifier Service.
*/
@Component(immediate = true)
@Service
-public class FlowClassifierManager extends AbstractListenerManager<FlowClassifierEvent, FlowClassifierListener>
- implements FlowClassifierService {
+public class FlowClassifierManager implements FlowClassifierService {
private static final String FLOW_CLASSIFIER_NOT_NULL = "Flow Classifier cannot be null";
private static final String FLOW_CLASSIFIER_ID_NOT_NULL = "Flow Classifier Id cannot be null";
private static final String LISTENER_NOT_NULL = "Listener cannot be null";
private final Logger log = getLogger(FlowClassifierManager.class);
-
+ private final Set<FlowClassifierListener> listeners = Sets.newCopyOnWriteArraySet();
private EventuallyConsistentMap<FlowClassifierId, FlowClassifier> flowClassifierStore;
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
@@ -75,6 +75,7 @@ public class FlowClassifierManager extends AbstractListenerManager<FlowClassifie
@Deactivate
protected void deactivate() {
flowClassifierStore.destroy();
+ listeners.clear();
log.info("Flow Classifier service deactivated");
}
@@ -144,4 +145,16 @@ public class FlowClassifierManager extends AbstractListenerManager<FlowClassifie
}
return true;
}
+
+ @Override
+ public void addListener(FlowClassifierListener listener) {
+ checkNotNull(listener, LISTENER_NOT_NULL);
+ listeners.add(listener);
+ }
+
+ @Override
+ public void removeListener(FlowClassifierListener listener) {
+ checkNotNull(listener, LISTENER_NOT_NULL);
+ listeners.remove(listener);
+ }
}
diff --git a/framework/src/onos/apps/vtn/vtnweb/pom.xml b/framework/src/onos/apps/vtn/vtnweb/pom.xml
index bcb71d9f..0aa1f616 100644
--- a/framework/src/onos/apps/vtn/vtnweb/pom.xml
+++ b/framework/src/onos/apps/vtn/vtnweb/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.onosproject</groupId>
<artifactId>onos-app-vtn</artifactId>
- <version>1.4.0-SNAPSHOT</version>
+ <version>1.4.0-rc1</version>
<relativePath>../pom.xml</relativePath>
</parent>