Author: pderop
Date: Tue Feb 23 22:13:14 2016
New Revision: 1731979
URL: http://svn.apache.org/viewvc?rev=1731979&view=rev
Log:
FELIX-5177: Renamed ComponentContext.createConfigurationProxy method to
ComponentContext.createConfigurationProxy.createConfigurationType.
Fixed some javadocs.
Modified:
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/impl/ConfigurationDependencyBuilderImpl.java
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/impl/FactoryPidAdapterBuilderImpl.java
felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/DependencyManager.java
felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/context/ComponentContext.java
felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ComponentImpl.java
felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ComponentScheduler.java
felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/FilterComponent.java
Modified:
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/impl/ConfigurationDependencyBuilderImpl.java
URL:
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/impl/ConfigurationDependencyBuilderImpl.java?rev=1731979&r1=1731978&r2=1731979&view=diff
==============================================================================
---
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/impl/ConfigurationDependencyBuilderImpl.java
(original)
+++
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/impl/ConfigurationDependencyBuilderImpl.java
Tue Feb 23 22:13:14 2016
@@ -120,7 +120,7 @@ public class ConfigurationDependencyBuil
Class<T> componentType = Helpers.getLambdaArgType(callback, 0);
m_pid = m_pid == null ? configClass.getName() : m_pid;
return setComponentCallbackRef(componentType, (instance, component,
props) -> {
- U configProxy = ((ComponentContext)
m_component).createConfigurationProxy(configClass, props);
+ U configProxy = ((ComponentContext)
m_component).createConfigurationType(configClass, props);
callback.accept((T) instance, configProxy);
});
}
@@ -130,7 +130,7 @@ public class ConfigurationDependencyBuil
Class<T> componentType = Helpers.getLambdaArgType(callback, 0);
m_pid = m_pid == null ? configClass.getName() : m_pid;
return setComponentCallbackRef(componentType, (instance, component,
props) -> {
- U configProxy = ((ComponentContext)
m_component).createConfigurationProxy(configClass, props);
+ U configProxy = ((ComponentContext)
m_component).createConfigurationType(configClass, props);
callback.accept((T) instance, configProxy, component);
});
}
@@ -152,7 +152,7 @@ public class ConfigurationDependencyBuil
public <T> ConfigurationDependencyBuilder update(Class<T> configClass,
InstanceCbConfiguration<T> updated) {
m_pid = m_pid == null ? configClass.getName() : m_pid;
return setInstanceCallbackRef((instance, component, props) -> {
- T configProxy = ((ComponentContext)
m_component).createConfigurationProxy(configClass, props);
+ T configProxy = ((ComponentContext)
m_component).createConfigurationType(configClass, props);
updated.accept(configProxy);
});
}
@@ -160,7 +160,7 @@ public class ConfigurationDependencyBuil
public <T> ConfigurationDependencyBuilder update(Class<T> configClass,
InstanceCbConfigurationComponent<T> updated) {
m_pid = m_pid == null ? configClass.getName() : m_pid;
return setInstanceCallbackRef((instance, component, props) -> {
- T configProxy = ((ComponentContext)
m_component).createConfigurationProxy(configClass, props);
+ T configProxy = ((ComponentContext)
m_component).createConfigurationType(configClass, props);
updated.accept(configProxy, component);
});
}
Modified:
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/impl/FactoryPidAdapterBuilderImpl.java
URL:
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/impl/FactoryPidAdapterBuilderImpl.java?rev=1731979&r1=1731978&r2=1731979&view=diff
==============================================================================
---
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/impl/FactoryPidAdapterBuilderImpl.java
(original)
+++
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/impl/FactoryPidAdapterBuilderImpl.java
Tue Feb 23 22:13:14 2016
@@ -133,7 +133,7 @@ public class FactoryPidAdapterBuilderImp
Class<T> type = Helpers.getLambdaArgType(callback, 0);
m_factoryPid = m_factoryPid == null ? configType.getName() :
m_factoryPid;
return setComponentCallbackRef(type, (instance, component, props) -> {
- U configProxy = ((ComponentContext)
component).createConfigurationProxy(configType, props);
+ U configProxy = ((ComponentContext)
component).createConfigurationType(configType, props);
callback.accept((T) instance, configProxy);
});
}
@@ -149,7 +149,7 @@ public class FactoryPidAdapterBuilderImp
Class<T> type = Helpers.getLambdaArgType(callback, 0);
m_factoryPid = m_factoryPid == null ? configType.getName() :
m_factoryPid;
return setComponentCallbackRef(type, (instance, component, props) -> {
- U configProxy = ((ComponentContext)
component).createConfigurationProxy(configType, props);
+ U configProxy = ((ComponentContext)
component).createConfigurationType(configType, props);
callback.accept((T) instance, configProxy, component);
});
}
@@ -162,7 +162,7 @@ public class FactoryPidAdapterBuilderImp
@Override
public <T> FactoryPidAdapterBuilder update(Class<T> configType,
InstanceCbConfiguration<T> callback) {
return setInstanceCallbackRef((instance, component, props) -> {
- T configProxy = ((ComponentContext)
component).createConfigurationProxy(configType, props);
+ T configProxy = ((ComponentContext)
component).createConfigurationType(configType, props);
callback.accept(configProxy);
});
}
@@ -175,7 +175,7 @@ public class FactoryPidAdapterBuilderImp
@Override
public <T> FactoryPidAdapterBuilder update(Class<T> configType,
InstanceCbConfigurationComponent<T> callback) {
return setInstanceCallbackRef((instance, component, props) -> {
- T configProxy = ((ComponentContext)
component).createConfigurationProxy(configType, props);
+ T configProxy = ((ComponentContext)
component).createConfigurationType(configType, props);
callback.accept(configProxy, component);
});
}
Modified:
felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/DependencyManager.java
URL:
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/DependencyManager.java?rev=1731979&r1=1731978&r2=1731979&view=diff
==============================================================================
---
felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/DependencyManager.java
(original)
+++
felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/DependencyManager.java
Tue Feb 23 22:13:14 2016
@@ -250,7 +250,7 @@ public class DependencyManager {
* It will also inherit all dependencies, and if you declare the original
* service as a member it will be injected.
*
- * <h3>Usage Example</h3>
+ * <p>Usage example:
*
* <blockquote><pre>
* manager.createAdapterService(AdapteeService.class, "(foo=bar)")
@@ -275,7 +275,7 @@ public class DependencyManager {
* It will also inherit all dependencies, and if you declare the original
* service as a member it will be injected.
*
- * <h3>Usage Example</h3>
+ * <p>Usage example:
*
* <blockquote><pre>
* manager.createAdapterService(AdapteeService.class, "(foo=bar)",
"m_service")
@@ -301,7 +301,7 @@ public class DependencyManager {
* It will also inherit all dependencies, and if you declare the original
* service as a member it will be injected.
*
- * <h3>Usage Example</h3>
+ * <p>Usage example:
*
* <blockquote><pre>
* manager.createAdapterService(AdapteeService.class, "(foo=bar)", "add",
"change", "remove")
@@ -331,7 +331,7 @@ public class DependencyManager {
* It will also inherit all dependencies, and if you declare the original
* service as a member it will be injected.
*
- * <h3>Usage Example</h3>
+ * <p>Usage example:
*
* <blockquote><pre>
* manager.createAdapterService(AdapteeService.class, "(foo=bar)", "add",
"change", "remove", "swap")
@@ -362,7 +362,7 @@ public class DependencyManager {
* It will also inherit all dependencies, and if you declare the original
* service as a member it will be injected.
*
- * <h3>Usage Example</h3>
+ * <p>Usage example:
*
* <blockquote><pre>
* manager.createAdapterService(AdapteeService.class, "(foo=bar)", "add",
"change", "remove", "swap")
@@ -389,14 +389,18 @@ public class DependencyManager {
}
/**
- * Creates a new Managed Service Factory Configuration Adapter. For each
new Config Admin factory configuration matching
+ * Creates a new Factory Configuration Adapter. For each new factory
configuration matching
* the factoryPid, an adapter will be created based on the adapter
implementation class.
* The adapter will be registered with the specified interface, and with
the specified adapter service properties.
* Depending on the <code>propagate</code> parameter, every public factory
configuration properties
* (which don't start with ".") will be propagated along with the adapter
service properties.
* It will also inherit all dependencies.
+ * <p> The callback you specify may accept the following method signatures:
+ * <ul><li> updated(Dictionary)
+ * <li> updated(Component, Dictionary)
+ * </ul>
*
- * <h3>Usage Example</h3>
+ * <p>Usage example:
*
* <blockquote><pre>
* manager.createFactoryConfigurationAdapterService("MyFactoryPid",
"update", true)
@@ -407,11 +411,7 @@ public class DependencyManager {
* </pre></blockquote>
*
* @param factoryPid the pid matching the factory configuration
- * @param update the adapter method name that will be notified when the
factory configuration is created/updated.<p>
- * The following signatures are supported:<p>
- * <ul><li> updated(Dictionary)
- * <li> updated(Component, Dictionary)
- * </ul>
+ * @param update the adapter method name that will be notified when the
factory configuration is created/updated.
* @param propagate true if public factory configuration should be
propagated to the adapter service properties
* @return a service that acts as a factory for generating the managed
service factory configuration adapter
*/
@@ -420,20 +420,20 @@ public class DependencyManager {
}
/**
- * Creates a new Managed Service Factory Configuration Adapter using a
specific update callback instance.
- * For each new Config Admin factory configuration matching the
factoryPid, an adapter will be created
+ * Creates a new Factory Configuration Adapter using a specific update
callback instance.
+ * For each new factory configuration matching the factoryPid, an adapter
will be created
* based on the adapter implementation class.
* The adapter will be registered with the specified interface, and with
the specified adapter service properties.
* Depending on the <code>propagate</code> parameter, every public factory
configuration properties
* (which don't start with ".") will be propagated along with the adapter
service properties.
* It will also inherit all dependencies.
+ * <p> The callback you specify may accept the following method signatures:
+ * <ul><li> updated(Dictionary)
+ * <li> updated(Component, Dictionary)
+ * </ul>
*
* @param factoryPid the pid matching the factory configuration
- * @param update the adapter method name that will be notified when the
factory configuration is created/updated.<p>
- * The following signatures are supported:<p>
- * <ul><li> updated(Dictionary)
- * <li> updated(Component, Dictionary)
- * </ul>
+ * @param update the adapter method name that will be notified when the
factory configuration is created/updated.
* @param propagate true if public factory configuration should be
propagated to the adapter service properties
* @param callbackInstance the object on which the updated callback will
be invoked.
* @return a service that acts as a factory for generating the managed
service factory configuration adapter
@@ -443,29 +443,22 @@ public class DependencyManager {
}
/**
- * Creates a new Managed Service Factory Configuration Adapter. For each
new Config Admin factory configuration matching
+ * Creates a new Factory Configuration Adapter. For each new factory
configuration matching
* the factoryPid, an adapter will be created based on the adapter
implementation class.
* The adapter will be registered with the specified interface, and with
the specified adapter service properties.
* Depending on the <code>propagate</code> parameter, every public factory
configuration properties
* (which don't start with ".") will be propagated along with the adapter
service properties.
* It will also inherit all dependencies.
- *
- * <h3>Usage Example</h3>
- *
- * <blockquote><pre>
- * manager.createFactoryConfigurationAdapterService("MyFactoryPid",
"update", true)
- * // The interface to use when registering adapter
- * .setInterface(AdapterService.class.getName(), new Hashtable()
{{ put("foo", "bar"); }})
- * // the implementation of the adapter
- * .setImplementation(AdapterServiceImpl.class);
- * </pre></blockquote>
+ * <p> The callback you specify may accept the following method signatures:
+ * <ul><li> updated(Dictionary)
+ * <li> updated(Component, Dictionary)
+ * <li> updated(ConfigurationType)
+ * <li> updated(Component, ConfigurationType)
+ * </ul>
+ * <p>The ConfigurationType parameter is an implementation of the
<code>configType</code> argument.
*
* @param factoryPid the pid matching the factory configuration
* @param update the adapter method name that will be notified when the
factory configuration is created/updated.<p>
- * The following signatures are supported:<p>
- * <ul><li> updated(Dictionary)
- * <li> updated(Component, Dictionary)
- * </ul>
* @param propagate true if public factory configuration should be
propagated to the adapter service properties
* @param configType the configuration type to use instead of a
dictionary. See the javadoc from {@link ConfigurationDependency} for
* more informations about type-safe configuration.
@@ -477,20 +470,22 @@ public class DependencyManager {
}
/**
- * Creates a new Managed Service Factory Configuration Adapter using a
specific update callback instance.
- * For each new Config Admin factory configuration matching the
factoryPid, an adapter will be created
+ * Creates a new Factory Configuration Adapter using a specific update
callback instance.
+ * For each new factory configuration matching the factoryPid, an adapter
will be created
* based on the adapter implementation class.
* The adapter will be registered with the specified interface, and with
the specified adapter service properties.
* Depending on the <code>propagate</code> parameter, every public factory
configuration properties
* (which don't start with ".") will be propagated along with the adapter
service properties.
* It will also inherit all dependencies.
+ * <p> The callback you specify may accept the following method signatures:
+ * <ul><li> updated(Dictionary)
+ * <li> updated(Component, Dictionary)
+ * <li> updated(ConfigurationType)
+ * <li> updated(Component, ConfigurationType)
+ * </ul>
+ * <p>The ConfigurationType parameter is an implementation of the
<code>configType</code> argument.
*
* @param factoryPid the pid matching the factory configuration
- * @param update the adapter method name that will be notified when the
factory configuration is created/updated.<p>
- * The following signatures are supported:<p>
- * <ul><li> updated(Dictionary)
- * <li> updated(Component, Dictionary)
- * </ul>
* @param propagate true if public factory configuration should be
propagated to the adapter service properties
* @param callbackInstance the object on which the updated callback will
be invoked.
* @param configType the configuration type to use instead of a
dictionary. See the javadoc from {@link ConfigurationDependency} for
@@ -502,14 +497,14 @@ public class DependencyManager {
}
/**
- * Creates a new Managed Service Factory Configuration Adapter with meta
type support. For each new Config Admin
+ * Creates a new Managed Service Factory Configuration Adapter with meta
type support. For each new
* factory configuration matching the factoryPid, an adapter will be
created based on the adapter implementation
* class. The adapter will be registered with the specified interface, and
with the specified adapter service
* properties. Depending on the <code>propagate</code> parameter, every
public factory configuration properties
* (which don't start with ".") will be propagated along with the adapter
service properties.
* It will also inherit all dependencies.
*
- * <h3>Usage Example</h3>
+ * <p>Usage example:
*
* <blockquote><pre>
* PropertyMetaData[] propertiesMetaData = new PropertyMetaData[] {
@@ -568,7 +563,7 @@ public class DependencyManager {
* It will also inherit all dependencies, and if you declare the original
* service as a member it will be injected.
*
- * <h3>Usage Example</h3>
+ * <p>Usage example:
*
* <blockquote><pre>
* manager.createBundleAdapterService(Bundle.INSTALLED | Bundle.RESOLVED
| Bundle.ACTIVE,
@@ -618,7 +613,7 @@ public class DependencyManager {
* It will also inherit all dependencies, and if you declare the original
* service as a member it will be injected.
*
- * <h3>Usage Example</h3>
+ * <p>Usage example:
*
* <blockquote><pre>
*
manager.createResourceAdapterService("(&(path=/test)(repository=TestRepository))",
true)
@@ -681,7 +676,7 @@ public class DependencyManager {
* It will also inherit all dependencies, and if you declare the original
* service as a member it will be injected.
*
- * <h3>Usage Example</h3>
+ * <p>Usage example:
*
* <blockquote><pre>
* manager.createAspectService(ExistingService.class, "(foo=bar)", 10,
"m_service")
@@ -709,7 +704,7 @@ public class DependencyManager {
* It will also inherit all dependencies, and if you declare the original
* service as a member it will be injected.
*
- * <h3>Usage Example</h3>
+ * <p>Usage example:
*
* <blockquote><pre>
* manager.createAspectService(ExistingService.class, "(foo=bar)", 10)
@@ -735,7 +730,7 @@ public class DependencyManager {
* It will also inherit all dependencies, and if you declare the original
* service as a member it will be injected.
*
- * <h3>Usage Example</h3>
+ * <p>Usage example:
*
* <blockquote><pre>
* manager.createAspectService(ExistingService.class, "(foo=bar)", 10,
"add", "change", "remove")
@@ -766,7 +761,7 @@ public class DependencyManager {
* It will also inherit all dependencies, and if you declare the original
* service as a member it will be injected.
*
- * <h3>Usage Example</h3>
+ * <p>Usage example:
*
* <blockquote><pre>
* manager.createAspectService(ExistingService.class, "(foo=bar)", 10,
"add", "change", "remove")
@@ -798,7 +793,7 @@ public class DependencyManager {
* It will also inherit all dependencies, and if you declare the original
* service as a member it will be injected.
*
- * <h3>Usage Example</h3>
+ * <p>Usage example:
*
* <blockquote><pre>
* manager.createAspectService(ExistingService.class, "(foo=bar)", 10,
"add", "change", "remove")
Modified:
felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/context/ComponentContext.java
URL:
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/context/ComponentContext.java?rev=1731979&r1=1731978&r2=1731979&view=diff
==============================================================================
---
felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/context/ComponentContext.java
(original)
+++
felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/context/ComponentContext.java
Tue Feb 23 22:13:14 2016
@@ -167,5 +167,5 @@ public interface ComponentContext extend
* @param config the configuration to wrap, cannot be <code>null</code>.
* @return an instance of the given type that wraps the given
configuration.
*/
- public <T> T createConfigurationProxy(Class<T> type, Dictionary<?, ?>
config);
+ public <T> T createConfigurationType(Class<T> type, Dictionary<?, ?>
config);
}
Modified:
felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ComponentImpl.java
URL:
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ComponentImpl.java?rev=1731979&r1=1731978&r2=1731979&view=diff
==============================================================================
---
felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ComponentImpl.java
(original)
+++
felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ComponentImpl.java
Tue Feb 23 22:13:14 2016
@@ -341,7 +341,7 @@ public class ComponentImpl implements Co
}
@Override
- public <T> T createConfigurationProxy(Class<T> type, Dictionary<?, ?>
config) {
+ public <T> T createConfigurationType(Class<T> type, Dictionary<?, ?>
config) {
return Configurable.create(type, config);
}
Modified:
felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ComponentScheduler.java
URL:
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ComponentScheduler.java?rev=1731979&r1=1731978&r2=1731979&view=diff
==============================================================================
---
felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ComponentScheduler.java
(original)
+++
felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ComponentScheduler.java
Tue Feb 23 22:13:14 2016
@@ -27,14 +27,12 @@ import org.apache.felix.dm.ComponentDecl
import org.apache.felix.dm.ComponentExecutorFactory;
import org.apache.felix.dm.context.ComponentContext;
import org.osgi.framework.BundleContext;
-import org.osgi.service.component.ComponentFactory;
/**
* The Dependency Manager delegates all components addition/removal to this
class.
* If a ComponentExecutorFactory is registered in the OSGi registry, this
class will use it to get an
* Executor used for components management and lifecycle callbacks.
*
- * @see {@link ComponentFactory}
* @author <a href="mailto:[email protected]">Felix Project Team</a>
*/
public class ComponentScheduler {
Modified:
felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/FilterComponent.java
URL:
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/FilterComponent.java?rev=1731979&r1=1731978&r2=1731979&view=diff
==============================================================================
---
felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/FilterComponent.java
(original)
+++
felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/FilterComponent.java
Tue Feb 23 22:13:14 2016
@@ -67,8 +67,8 @@ public class FilterComponent implements
}
@Override
- public <T> T createConfigurationProxy(Class<T> type, Dictionary<?, ?>
config) {
- return m_component.createConfigurationProxy(type, config);
+ public <T> T createConfigurationType(Class<T> type, Dictionary<?, ?>
config) {
+ return m_component.createConfigurationType(type, config);
}
@Override