You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by pd...@apache.org on 2014/10/20 10:19:53 UTC
svn commit: r1633074 - in
/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm:
./ impl/
Author: pderop
Date: Mon Oct 20 08:19:52 2014
New Revision: 1633074
URL: http://svn.apache.org/r1633074
Log:
javadoc. The ServiceDependency.setDebug() method is now returning this ServiceDependency.
Modified:
felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/BundleDependency.java
felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/Component.java
felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/Dependency.java
felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/DependencyManager.java
felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/ServiceDependency.java
felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ServiceDependencyImpl.java
Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/BundleDependency.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/BundleDependency.java?rev=1633074&r1=1633073&r2=1633074&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/BundleDependency.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/BundleDependency.java Mon Oct 20 08:19:52 2014
@@ -126,7 +126,7 @@ public interface BundleDependency extend
/**
* Sets an Object instance and a callback method used to propagate some properties to the provided service properties.
- * The method will be invoked on the specified object instance and must have one of the following signatures:<p>
+ * The method will be invoked on the specified object instance and must have one of the following signatures:
* <ul><li>Dictionary callback(ServiceReference, Object service)
* <li>Dictionary callback(ServiceReference)
* </ul>
Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/Component.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/Component.java?rev=1633074&r1=1633073&r2=1633074&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/Component.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/Component.java Mon Oct 20 08:19:52 2014
@@ -68,9 +68,10 @@ public interface Component {
/**
* Adds dependency(ies) to this component, atomically. If the component is already active or if you add
* dependencies from the init method, then you should add all the dependencies in one single add method call
- * (using the varargs argument).
+ * (using the varargs argument), because this method may trigger component activation (like
+ * the ServiceTracker.open() method does).
*
- * @param dependency the dependency(ies) to add
+ * @param dependencies the dependencies to add.
* @return this component
*/
public Component add(Dependency ... dependencies);
@@ -87,14 +88,14 @@ public interface Component {
*
* @param listener the state listener
*/
- public Component add(ComponentStateListener l);
+ public Component add(ComponentStateListener listener);
/**
* Removes a component state listener from this component.
*
* @param listener the state listener
*/
- public Component remove(ComponentStateListener l);
+ public Component remove(ComponentStateListener listener);
/**
* Sets the public interface under which this component should be registered
@@ -137,7 +138,7 @@ public interface Component {
*
* @param clazz the class (from the list above)
* @param instanceName the name of the instance to inject the class into
- * @see setAutoConfig(Class, boolean)
+ * @see #setAutoConfig(Class, boolean)
*/
public Component setAutoConfig(Class<?> clazz, String instanceName);
Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/Dependency.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/Dependency.java?rev=1633074&r1=1633073&r2=1633074&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/Dependency.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/Dependency.java Mon Oct 20 08:19:52 2014
@@ -43,12 +43,12 @@ public interface Dependency {
public boolean isAvailable();
/**
- * Returns <code>true>code> if auto configuration is enabled for this dependency.
+ * Returns <code>true</code> if auto configuration is enabled for this dependency.
* Auto configuration means that a dependency is injected in the component instance
* when it's available, and if it's unavailable, a "null object" will be inserted
* instead.
*
- * @return <code>true</code> if auto configuration is enabled for this dependency
+ * @return true if auto configuration is enabled for this dependency
*/
public boolean isAutoConfig();
@@ -57,7 +57,7 @@ public interface Dependency {
* to inject into. If you specify this, not all members of the right
* type will be injected, only the member whose name matches.
*
- * @return
+ * @return the name of the member in the class of the component instance to inject into
*/
public String getAutoConfigName();
Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/DependencyManager.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/DependencyManager.java?rev=1633074&r1=1633073&r2=1633074&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/DependencyManager.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/DependencyManager.java Mon Oct 20 08:19:52 2014
@@ -179,7 +179,7 @@ public class DependencyManager {
* Removes a service from the dependency manager. Before the service is removed
* it is stopped first.
*
- * @param service the service to remove
+ * @param c the component to remove
*/
public void remove(Component c) {
ComponentScheduler.instance().remove(c);
@@ -314,7 +314,6 @@ public class DependencyManager {
* @param add name of the callback method to invoke on add
* @param change name of the callback method to invoke on change
* @param remove name of the callback method to invoke on remove
- * @param swap name of the callback method to invoke on swap
* @return a service that acts as a factory for generating adapters
*/
public Component createAdapterService(Class<?> serviceInterface, String serviceFilter, String add, String change,
@@ -518,7 +517,6 @@ public class DependencyManager {
* </pre></blockquote>
*
* @param resourceFilter the filter condition to use with the resource
- * @param resourcePropertiesFilter the filter condition on the resource properties to use with the resource
* @param propagate <code>true</code> if properties from the resource should be propagated to the service
* @param callbackInstance instance to invoke the callback on
* @param callbackChanged the name of the callback method
Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/ServiceDependency.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/ServiceDependency.java?rev=1633074&r1=1633073&r2=1633074&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/ServiceDependency.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/ServiceDependency.java Mon Oct 20 08:19:52 2014
@@ -32,8 +32,8 @@ public interface ServiceDependency exten
* feature is automatically turned off, because we're assuming you don't need it in this
* case.
*
- * @param added the method to call when a service was added
- * @param removed the method to call when a service was removed
+ * @param add the method to call when a service was added
+ * @param remove the method to call when a service was removed
* @return this service dependency
*/
public ServiceDependency setCallbacks(String add, String remove);
@@ -44,9 +44,9 @@ public interface ServiceDependency exten
* configuration feature is automatically turned off, because we're assuming you don't
* need it in this case.
*
- * @param added the method to call when a service was added
- * @param changed the method to call when a service was changed
- * @param removed the method to call when a service was removed
+ * @param add the method to call when a service was added
+ * @param change the method to call when a service was changed
+ * @param remove the method to call when a service was removed
* @return this service dependency
*/
public ServiceDependency setCallbacks(String add, String change, String remove);
@@ -56,14 +56,14 @@ public interface ServiceDependency exten
* dependency is added, changed or removed. When you specify callbacks, the auto
* configuration feature is automatically turned off, because we're assuming you don't
* need it in this case.
- * @param added the method to call when a service was added
- * @param changed the method to call when a service was changed
- * @param removed the method to call when a service was removed
- * @param swapped the method to call when the service was swapped due to addition or
+ * @param add the method to call when a service was added
+ * @param change the method to call when a service was changed
+ * @param remove the method to call when a service was removed
+ * @param swap the method to call when the service was swapped due to addition or
* removal of an aspect
* @return this service dependency
*/
- public ServiceDependency setCallbacks(String added, String changed, String removed, String swapped);
+ public ServiceDependency setCallbacks(String add, String change, String remove, String swap);
/**
* Sets the callbacks for this service. These callbacks can be used as hooks whenever a
@@ -72,8 +72,8 @@ public interface ServiceDependency exten
* we're assuming you don't need it in this case.
*
* @param instance the instance to call the callbacks on
- * @param added the method to call when a service was added
- * @param removed the method to call when a service was removed
+ * @param add the method to call when a service was added
+ * @param remove the method to call when a service was removed
* @return this service dependency
*/
public ServiceDependency setCallbacks(Object instance, String add, String remove);
@@ -85,9 +85,9 @@ public interface ServiceDependency exten
* we're assuming you don't need it in this case.
*
* @param instance the instance to call the callbacks on
- * @param added the method to call when a service was added
- * @param changed the method to call when a service was changed
- * @param removed the method to call when a service was removed
+ * @param add the method to call when a service was added
+ * @param change the method to call when a service was changed
+ * @param remove the method to call when a service was removed
* @return this service dependency
*/
public ServiceDependency setCallbacks(Object instance, String add, String change, String remove);
@@ -187,7 +187,7 @@ public interface ServiceDependency exten
* </pre>
* </blockquote>
*
- * @param instanceName the name of attribute to auto config
+ * @param autoConfig the name of attribute to auto configure
* @return this service dependency
*/
public ServiceDependency setAutoConfig(boolean autoConfig);
@@ -278,8 +278,8 @@ public interface ServiceDependency exten
/**
* Enabled debug logging for this dependency instance. The logging is prefixed with the given identifier.
- * @param identifier
+ * @param debugKey a prefix log identifier
* @return this service dependency.
*/
- public void setDebug(String debugKey);
+ public ServiceDependency setDebug(String debugKey);
}
Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ServiceDependencyImpl.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ServiceDependencyImpl.java?rev=1633074&r1=1633073&r2=1633074&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ServiceDependencyImpl.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ServiceDependencyImpl.java Mon Oct 20 08:19:52 2014
@@ -56,9 +56,10 @@ public class ServiceDependencyImpl exten
private boolean debug = false;
private String debugKey;
- public void setDebug(String debugKey) {
+ public ServiceDependency setDebug(String debugKey) {
this.debugKey = debugKey;
this.debug = true;
+ return this;
}
/**