polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulmer...@apache.org
Subject [04/50] [abbrv] polygene-java git commit: :libraries:osgi refine
Date Tue, 16 May 2017 18:50:56 GMT
:libraries:osgi refine


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/03a930e4
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/03a930e4
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/03a930e4

Branch: refs/heads/master
Commit: 03a930e471ee99448a3fb9176322816119a0952b
Parents: c0fefa7
Author: Paul Merlin <paulmerlin@apache.org>
Authored: Mon May 15 10:43:34 2017 +0200
Committer: Paul Merlin <paulmerlin@apache.org>
Committed: Mon May 15 10:43:34 2017 +0200

----------------------------------------------------------------------
 .../org/apache/polygene/library/osgi/OSGiEnabledService.java  | 7 +++----
 .../org/apache/polygene/library/osgi/OSGiServiceExporter.java | 6 ++----
 .../org/apache/polygene/library/osgi/OSGiServiceTest.java     | 1 +
 3 files changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/03a930e4/libraries/osgi/src/main/java/org/apache/polygene/library/osgi/OSGiEnabledService.java
----------------------------------------------------------------------
diff --git a/libraries/osgi/src/main/java/org/apache/polygene/library/osgi/OSGiEnabledService.java
b/libraries/osgi/src/main/java/org/apache/polygene/library/osgi/OSGiEnabledService.java
index 5a3a5f5..faf5787 100644
--- a/libraries/osgi/src/main/java/org/apache/polygene/library/osgi/OSGiEnabledService.java
+++ b/libraries/osgi/src/main/java/org/apache/polygene/library/osgi/OSGiEnabledService.java
@@ -24,10 +24,10 @@ import java.util.Dictionary;
 import java.util.stream.Stream;
 import org.apache.polygene.api.activation.ActivatorAdapter;
 import org.apache.polygene.api.activation.Activators;
+import org.apache.polygene.api.identity.HasIdentity;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.injection.scope.Uses;
 import org.apache.polygene.api.mixin.Mixins;
-import org.apache.polygene.api.service.ServiceComposite;
 import org.apache.polygene.api.service.ServiceDescriptor;
 import org.apache.polygene.api.service.ServiceReference;
 import org.apache.polygene.api.structure.Module;
@@ -42,9 +42,8 @@ import static org.apache.polygene.api.util.Classes.typesOf;
  */
 @Mixins( OSGiEnabledService.OSGiEnabledServiceMixin.class )
 @Activators( OSGiEnabledService.Activator.class )
-public interface OSGiEnabledService extends ServiceComposite
+public interface OSGiEnabledService extends HasIdentity
 {
-
     void registerServices()
         throws Exception;
 
@@ -70,7 +69,7 @@ public interface OSGiEnabledService extends ServiceComposite
         }
     }
 
-    public abstract class OSGiEnabledServiceMixin
+    abstract class OSGiEnabledServiceMixin
         implements OSGiEnabledService
     {
         @Uses

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/03a930e4/libraries/osgi/src/main/java/org/apache/polygene/library/osgi/OSGiServiceExporter.java
----------------------------------------------------------------------
diff --git a/libraries/osgi/src/main/java/org/apache/polygene/library/osgi/OSGiServiceExporter.java
b/libraries/osgi/src/main/java/org/apache/polygene/library/osgi/OSGiServiceExporter.java
index 0f98e4f..6ba61e0 100644
--- a/libraries/osgi/src/main/java/org/apache/polygene/library/osgi/OSGiServiceExporter.java
+++ b/libraries/osgi/src/main/java/org/apache/polygene/library/osgi/OSGiServiceExporter.java
@@ -41,9 +41,7 @@ import static org.apache.polygene.api.util.Classes.interfacesOf;
 @Mixins( OSGiServiceExporter.OSGiServiceExporterMixin.class )
 @Activators( OSGiServiceExporter.Activator.class )
 public interface OSGiServiceExporter
-    extends ServiceComposite
 {
-
     void registerServices()
         throws Exception;
 
@@ -70,14 +68,14 @@ public interface OSGiServiceExporter
 
     }
 
-    public static abstract class OSGiServiceExporterMixin
+    abstract class OSGiServiceExporterMixin
         implements OSGiServiceExporter
     {
 
         @Service
         @HasMetaInfo( BundleContext.class )
         private Iterable<ServiceReference<ServiceComposite>> services;
-        private ArrayList<ServiceRegistration> registrations = new ArrayList<ServiceRegistration>();
+        private ArrayList<ServiceRegistration> registrations = new ArrayList<>();
 
         @Override
         public void registerServices()

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/03a930e4/libraries/osgi/src/test/java/org/apache/polygene/library/osgi/OSGiServiceTest.java
----------------------------------------------------------------------
diff --git a/libraries/osgi/src/test/java/org/apache/polygene/library/osgi/OSGiServiceTest.java
b/libraries/osgi/src/test/java/org/apache/polygene/library/osgi/OSGiServiceTest.java
index 7076833..1514f54 100644
--- a/libraries/osgi/src/test/java/org/apache/polygene/library/osgi/OSGiServiceTest.java
+++ b/libraries/osgi/src/test/java/org/apache/polygene/library/osgi/OSGiServiceTest.java
@@ -59,6 +59,7 @@ public class OSGiServiceTest
         {
             "org.apache.polygene.library.osgi.OSGiServiceTest$MyService",
             "org.apache.polygene.library.osgi.OSGiEnabledService",
+            "org.apache.polygene.api.identity.HasIdentity",
             "org.apache.polygene.api.service.ServiceComposite",
             "org.apache.polygene.api.identity.HasIdentity",
             "org.apache.polygene.api.composite.Composite"


Mime
View raw message