felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pde...@apache.org
Subject svn commit: r1728312 - in /felix/trunk/dependencymanager: org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/compositefactory/ org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/sample...
Date Wed, 03 Feb 2016 13:43:15 GMT
Author: pderop
Date: Wed Feb  3 13:43:15 2016
New Revision: 1728312

URL: http://svn.apache.org/viewvc?rev=1728312&view=rev
Log:
Renamed DependencyManagerActivator.init() method to DependencyManagerActivator.activate().

Modified:
    felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/compositefactory/Activator.java
    felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/device/Activator.java
    felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/dictionary/Activator.java
    felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/factory/Activator.java
    felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/future/Activator.java
    felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/hello/Activator.java
    felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/DependencyManagerActivator.java

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/compositefactory/Activator.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/compositefactory/Activator.java?rev=1728312&r1=1728311&r2=1728312&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/compositefactory/Activator.java
(original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/compositefactory/Activator.java
Wed Feb  3 13:43:15 2016
@@ -20,9 +20,7 @@ package org.apache.felix.dm.lambda.sampl
 
 import static java.lang.System.out;
 
-import org.apache.felix.dm.DependencyManager;
 import org.apache.felix.dm.lambda.DependencyManagerActivator;
-import org.osgi.framework.BundleContext;
 import org.osgi.service.cm.ConfigurationAdmin;
 import org.osgi.service.log.LogService;
 
@@ -41,7 +39,7 @@ import org.osgi.service.log.LogService;
  */
 public class Activator extends DependencyManagerActivator {
     @Override
-    public void init(BundleContext ctx, DependencyManager dm) throws Exception {
+    public void activate() throws Exception {
     	out.println("type \"log info\" to see the logs emitted by this test.");
 
     	// Create the Factory used to instantiate ProvuderImpl, ProviderComposite1 and ProviderComposite2

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/device/Activator.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/device/Activator.java?rev=1728312&r1=1728311&r2=1728312&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/device/Activator.java
(original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/device/Activator.java
Wed Feb  3 13:43:15 2016
@@ -20,9 +20,7 @@ package org.apache.felix.dm.lambda.sampl
 
 import static java.lang.System.out;
 
-import org.apache.felix.dm.DependencyManager;
 import org.apache.felix.dm.lambda.DependencyManagerActivator;
-import org.osgi.framework.BundleContext;
 import org.osgi.service.log.LogService;
 
 /**
@@ -30,7 +28,7 @@ import org.osgi.service.log.LogService;
  */
 public class Activator extends DependencyManagerActivator {
     @Override
-    public void init(BundleContext ctx, DependencyManager dm) throws Exception { 
+    public void activate() throws Exception {
     	out.println("type \"log info\" to see the logs emitted by this test.");
 
     	// Create a pair of Device/DeviceParameter service with id=1

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/dictionary/Activator.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/dictionary/Activator.java?rev=1728312&r1=1728311&r2=1728312&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/dictionary/Activator.java
(original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/dictionary/Activator.java
Wed Feb  3 13:43:15 2016
@@ -19,20 +19,18 @@
 package org.apache.felix.dm.lambda.samples.dictionary;
 
 import static java.lang.System.out;
+import static org.apache.felix.service.command.CommandProcessor.COMMAND_FUNCTION;
+import static org.apache.felix.service.command.CommandProcessor.COMMAND_SCOPE;
 
-import org.apache.felix.dm.DependencyManager;
 import org.apache.felix.dm.lambda.DependencyManagerActivator;
-import org.osgi.framework.BundleContext;
 import org.osgi.service.log.LogService;
-import static org.apache.felix.service.command.CommandProcessor.COMMAND_FUNCTION;
-import static org.apache.felix.service.command.CommandProcessor.COMMAND_SCOPE;
 
 /**
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
 public class Activator extends DependencyManagerActivator {
     @Override
-    public void init(BundleContext ctx, DependencyManager dm) throws Exception {
+    public void activate() throws Exception {
     	out.println("type \"log info\" to see the logs emitted by this test.");
 
         // Create the factory configuration for our DictionaryImpl service. An instance of
the DictionaryImpl is created for each

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/factory/Activator.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/factory/Activator.java?rev=1728312&r1=1728311&r2=1728312&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/factory/Activator.java
(original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/factory/Activator.java
Wed Feb  3 13:43:15 2016
@@ -20,9 +20,7 @@ package org.apache.felix.dm.lambda.sampl
 
 import static java.lang.System.out;
 
-import org.apache.felix.dm.DependencyManager;
 import org.apache.felix.dm.lambda.DependencyManagerActivator;
-import org.osgi.framework.BundleContext;
 import org.osgi.service.log.LogService;
 
 /**
@@ -30,7 +28,7 @@ import org.osgi.service.log.LogService;
  */
 public class Activator extends DependencyManagerActivator {
     @Override
-    public void init(BundleContext ctx, DependencyManager dm) throws Exception {   
+    public void activate() throws Exception {
     	out.println("type \"log info\" to see the logs emitted by this test.");
 
         component(comp -> comp

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/future/Activator.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/future/Activator.java?rev=1728312&r1=1728311&r2=1728312&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/future/Activator.java
(original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/future/Activator.java
Wed Feb  3 13:43:15 2016
@@ -20,9 +20,7 @@ package org.apache.felix.dm.lambda.sampl
 
 import static java.lang.System.out;
 
-import org.apache.felix.dm.DependencyManager;
 import org.apache.felix.dm.lambda.DependencyManagerActivator;
-import org.osgi.framework.BundleContext;
 import org.osgi.service.log.LogService;
 
 /**
@@ -40,7 +38,7 @@ public class Activator extends Dependenc
      * Initialize our components using new DM-lambda activator base.
      */
     @Override
-    public void init(BundleContext ctx, DependencyManager dm) throws Exception {
+    public void activate() throws Exception {
     	out.println("type \"log info\" to see the logs emitted by this test.");
     	
     	// System.setProperty("http.proxyHost","your.http.proxy.host");

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/hello/Activator.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/hello/Activator.java?rev=1728312&r1=1728311&r2=1728312&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/hello/Activator.java
(original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/hello/Activator.java
Wed Feb  3 13:43:15 2016
@@ -20,9 +20,7 @@ package org.apache.felix.dm.lambda.sampl
 
 import static java.lang.System.out;
 
-import org.apache.felix.dm.DependencyManager;
 import org.apache.felix.dm.lambda.DependencyManagerActivator;
-import org.osgi.framework.BundleContext;
 import org.osgi.service.cm.ConfigurationAdmin;
 import org.osgi.service.event.EventAdmin;
 import org.osgi.service.log.LogService;
@@ -32,7 +30,7 @@ import org.osgi.service.log.LogService;
  */
 public class Activator extends DependencyManagerActivator {
     @Override
-    public void init(BundleContext ctx, DependencyManager dm) throws Exception {
+    public void activate() throws Exception {
     	out.println("type \"log info\" to see the logs emitted by this test.");
     	
     	// Creates a Service Provider (property names are deduced from lambda parameter names).

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/DependencyManagerActivator.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/DependencyManagerActivator.java?rev=1728312&r1=1728311&r2=1728312&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/DependencyManagerActivator.java
(original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/DependencyManagerActivator.java
Wed Feb  3 13:43:15 2016
@@ -80,7 +80,7 @@ public abstract class DependencyManagerA
     @Override
     public void start(BundleContext context) throws Exception {
         m_manager = new DependencyManager(context);
-        init(context, m_manager);
+        activate();
     }
 
     /**
@@ -88,23 +88,21 @@ public abstract class DependencyManagerA
      */
     @Override
     public void stop(BundleContext context) throws Exception {
-        destroy();
+        deactivate();
     }
 
     /**
      * Sub classes must override this method in order to build some DM components.
      * 
-     * @param ctx the BundleContext associated to the bundle activator.
-     * @param dm the DependencyManager object that can be used to add/remove components.
      * @throws Exception if the activation fails
      */
-    protected abstract void init(BundleContext ctx, DependencyManager dm) throws Exception;
+    protected abstract void activate() throws Exception;
 
     /**
      * Sub classes may override this method that is called when the Activator is stopped.
      * @throws Exception if the deactivation fails
      */
-    protected void destroy() throws Exception {
+    protected void deactivate() throws Exception {
     }
     
     /**
@@ -112,7 +110,7 @@ public abstract class DependencyManagerA
      * 
      * @return the DependencyManager associated to this Activator
      */
-    protected DependencyManager getDependencyManager() {
+    public DependencyManager getDM() {
         return m_manager;
     }
     
@@ -121,7 +119,7 @@ public abstract class DependencyManagerA
      * 
      * @return the bundle context
      */
-    protected BundleContext getBundleContext() {
+    public BundleContext getBC() {
         return m_manager.getBundleContext();
     }
     



Mime
View raw message