Added onlab-misc module and renamed onos-util-* modules to onlab-*.
Showing
7 changed files
with
65 additions
and
14 deletions
... | @@ -23,8 +23,9 @@ | ... | @@ -23,8 +23,9 @@ |
23 | description="ONOS services and model API"> | 23 | description="ONOS services and model API"> |
24 | <feature>scr</feature> | 24 | <feature>scr</feature> |
25 | <feature>onos-thirdparty-base</feature> | 25 | <feature>onos-thirdparty-base</feature> |
26 | - <bundle>mvn:org.onlab.onos/onos-utils-osgi/1.0.0-SNAPSHOT</bundle> | 26 | + <bundle>mvn:org.onlab.onos/onlab-misc/1.0.0-SNAPSHOT</bundle> |
27 | - <bundle>mvn:org.onlab.onos/onos-utils-rest/1.0.0-SNAPSHOT</bundle> | 27 | + <bundle>mvn:org.onlab.onos/onlab-osgi/1.0.0-SNAPSHOT</bundle> |
28 | + <bundle>mvn:org.onlab.onos/onlab-rest/1.0.0-SNAPSHOT</bundle> | ||
28 | 29 | ||
29 | <bundle>mvn:org.onlab.onos/onos-api/1.0.0-SNAPSHOT</bundle> | 30 | <bundle>mvn:org.onlab.onos/onos-api/1.0.0-SNAPSHOT</bundle> |
30 | </feature> | 31 | </feature> | ... | ... |
1 | +package org.onlab.onos.event.impl; | ||
2 | + | ||
3 | +import org.apache.felix.scr.annotations.Component; | ||
4 | +import org.apache.felix.scr.annotations.Service; | ||
5 | +import org.onlab.onos.event.Event; | ||
6 | +import org.onlab.onos.event.EventDispatchService; | ||
7 | +import org.onlab.onos.event.EventSink; | ||
8 | + | ||
9 | +import java.util.Set; | ||
10 | +import java.util.concurrent.ExecutorService; | ||
11 | +import java.util.concurrent.Executors; | ||
12 | + | ||
13 | +/** | ||
14 | + * Simple implementation of an event dispatching service. | ||
15 | + */ | ||
16 | +@Component(immediate = true) | ||
17 | +@Service | ||
18 | +public class SimpleEventDispatcher implements EventDispatchService { | ||
19 | + | ||
20 | + private final ExecutorService executor = Executors.newSingleThreadExecutor(); | ||
21 | + | ||
22 | + @Override | ||
23 | + public void post(Event event) { | ||
24 | + | ||
25 | + } | ||
26 | + | ||
27 | + @Override | ||
28 | + public <E extends Event> void addSink(Class<E> eventClass, EventSink<E> sink) { | ||
29 | + | ||
30 | + } | ||
31 | + | ||
32 | + @Override | ||
33 | + public <E extends Event> void removeSink(Class<E> eventClass) { | ||
34 | + | ||
35 | + } | ||
36 | + | ||
37 | + @Override | ||
38 | + public <E extends Event> EventSink<E> getSink(Class<E> eventClass) { | ||
39 | + return null; | ||
40 | + } | ||
41 | + | ||
42 | + @Override | ||
43 | + public Set<Class<? extends Event>> getSinks() { | ||
44 | + return null; | ||
45 | + } | ||
46 | +} |
... | @@ -6,15 +6,15 @@ | ... | @@ -6,15 +6,15 @@ |
6 | 6 | ||
7 | <parent> | 7 | <parent> |
8 | <groupId>org.onlab.onos</groupId> | 8 | <groupId>org.onlab.onos</groupId> |
9 | - <artifactId>onos-utils</artifactId> | 9 | + <artifactId>onlab-utils</artifactId> |
10 | <version>1.0.0-SNAPSHOT</version> | 10 | <version>1.0.0-SNAPSHOT</version> |
11 | <relativePath>../pom.xml</relativePath> | 11 | <relativePath>../pom.xml</relativePath> |
12 | </parent> | 12 | </parent> |
13 | 13 | ||
14 | - <artifactId>onos-utils-osgi</artifactId> | 14 | + <artifactId>onlab-osgi</artifactId> |
15 | <packaging>bundle</packaging> | 15 | <packaging>bundle</packaging> |
16 | 16 | ||
17 | - <description>OSGI utilities</description> | 17 | + <description>ON.Lab OSGI utilities</description> |
18 | 18 | ||
19 | <dependencies> | 19 | <dependencies> |
20 | <dependency> | 20 | <dependency> | ... | ... |
... | @@ -11,12 +11,13 @@ | ... | @@ -11,12 +11,13 @@ |
11 | <relativePath>../pom.xml</relativePath> | 11 | <relativePath>../pom.xml</relativePath> |
12 | </parent> | 12 | </parent> |
13 | 13 | ||
14 | - <artifactId>onos-utils</artifactId> | 14 | + <artifactId>onlab-utils</artifactId> |
15 | <packaging>pom</packaging> | 15 | <packaging>pom</packaging> |
16 | 16 | ||
17 | - <description>Domain agnostic utilities</description> | 17 | + <description>Domain agnostic ON.Lab utilities</description> |
18 | 18 | ||
19 | <modules> | 19 | <modules> |
20 | + <module>misc</module> | ||
20 | <module>osgi</module> | 21 | <module>osgi</module> |
21 | <module>rest</module> | 22 | <module>rest</module> |
22 | </modules> | 23 | </modules> |
... | @@ -28,7 +29,6 @@ | ... | @@ -28,7 +29,6 @@ |
28 | </dependency> | 29 | </dependency> |
29 | </dependencies> | 30 | </dependencies> |
30 | 31 | ||
31 | - | ||
32 | <build> | 32 | <build> |
33 | <plugins> | 33 | <plugins> |
34 | <plugin> | 34 | <plugin> | ... | ... |
... | @@ -6,15 +6,15 @@ | ... | @@ -6,15 +6,15 @@ |
6 | 6 | ||
7 | <parent> | 7 | <parent> |
8 | <groupId>org.onlab.onos</groupId> | 8 | <groupId>org.onlab.onos</groupId> |
9 | - <artifactId>onos-utils</artifactId> | 9 | + <artifactId>onlab-utils</artifactId> |
10 | <version>1.0.0-SNAPSHOT</version> | 10 | <version>1.0.0-SNAPSHOT</version> |
11 | <relativePath>../pom.xml</relativePath> | 11 | <relativePath>../pom.xml</relativePath> |
12 | </parent> | 12 | </parent> |
13 | 13 | ||
14 | - <artifactId>onos-utils-rest</artifactId> | 14 | + <artifactId>onlab-rest</artifactId> |
15 | <packaging>bundle</packaging> | 15 | <packaging>bundle</packaging> |
16 | 16 | ||
17 | - <description>JAX-RS utilities</description> | 17 | + <description>ON.Lab JAX-RS utilities</description> |
18 | 18 | ||
19 | <dependencies> | 19 | <dependencies> |
20 | <dependency> | 20 | <dependency> |
... | @@ -36,7 +36,7 @@ | ... | @@ -36,7 +36,7 @@ |
36 | 36 | ||
37 | <dependency> | 37 | <dependency> |
38 | <groupId>org.onlab.onos</groupId> | 38 | <groupId>org.onlab.onos</groupId> |
39 | - <artifactId>onos-utils-osgi</artifactId> | 39 | + <artifactId>onlab-osgi</artifactId> |
40 | <version>${project.version}</version> | 40 | <version>${project.version}</version> |
41 | </dependency> | 41 | </dependency> |
42 | </dependencies> | 42 | </dependencies> | ... | ... |
... | @@ -33,13 +33,13 @@ | ... | @@ -33,13 +33,13 @@ |
33 | 33 | ||
34 | <dependency> | 34 | <dependency> |
35 | <groupId>org.onlab.onos</groupId> | 35 | <groupId>org.onlab.onos</groupId> |
36 | - <artifactId>onos-utils-osgi</artifactId> | 36 | + <artifactId>onlab-osgi</artifactId> |
37 | <version>${project.version}</version> | 37 | <version>${project.version}</version> |
38 | </dependency> | 38 | </dependency> |
39 | 39 | ||
40 | <dependency> | 40 | <dependency> |
41 | <groupId>org.onlab.onos</groupId> | 41 | <groupId>org.onlab.onos</groupId> |
42 | - <artifactId>onos-utils-rest</artifactId> | 42 | + <artifactId>onlab-rest</artifactId> |
43 | <version>${project.version}</version> | 43 | <version>${project.version}</version> |
44 | </dependency> | 44 | </dependency> |
45 | 45 | ... | ... |
-
Please register or login to post a comment