You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cz...@apache.org on 2017/01/06 16:13:25 UTC

svn commit: r1777635 - in /felix/trunk/scr: ./ src/main/java/org/apache/felix/scr/component/ src/main/java/org/apache/felix/scr/impl/manager/ src/main/java/org/apache/felix/scr/impl/parser/ src/main/java/org/osgi/ src/main/java/org/osgi/service/ src/ma...

Author: cziegeler
Date: Fri Jan  6 16:13:24 2017
New Revision: 1777635

URL: http://svn.apache.org/viewvc?rev=1777635&view=rev
Log:
FELIX-5354 : Implement Declarative Service Updates for R7 (RFC 222)

Added:
    felix/trunk/scr/src/main/java/org/osgi/
    felix/trunk/scr/src/main/java/org/osgi/service/
    felix/trunk/scr/src/main/java/org/osgi/service/component/
    felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentConstants.java   (with props)
    felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentContext.java   (with props)
    felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentException.java   (with props)
    felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentFactory.java   (with props)
    felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentInstance.java   (with props)
    felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentServiceObjects.java   (with props)
    felix/trunk/scr/src/main/java/org/osgi/service/component/package-info.java   (with props)
    felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/
    felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/ServiceComponentRuntime.java   (with props)
    felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/
    felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ComponentConfigurationDTO.java   (with props)
    felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ComponentDescriptionDTO.java   (with props)
    felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ReferenceDTO.java   (with props)
    felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/SatisfiedReferenceDTO.java   (with props)
    felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/UnsatisfiedReferenceDTO.java   (with props)
    felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/package-info.java   (with props)
    felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/package-info.java   (with props)
Modified:
    felix/trunk/scr/pom.xml
    felix/trunk/scr/src/main/java/org/apache/felix/scr/component/ExtFactoryComponentInstance.java
    felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java
    felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ComponentContextImpl.java
    felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ComponentFactoryImpl.java
    felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ConfigurableComponentHolder.java
    felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/SingleComponentManager.java
    felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/parser/ParseException.java

Modified: felix/trunk/scr/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/scr/pom.xml?rev=1777635&r1=1777634&r2=1777635&view=diff
==============================================================================
--- felix/trunk/scr/pom.xml (original)
+++ felix/trunk/scr/pom.xml Fri Jan  6 16:13:24 2017
@@ -82,12 +82,14 @@
             <version>6.0.1</version>
             <scope>provided</scope>
         </dependency>
+<!-- 
         <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.service.component</artifactId>
             <version>1.3.0</version>
             <scope>provided</scope>
         </dependency>
+ -->        
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.configadmin</artifactId>

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/component/ExtFactoryComponentInstance.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/component/ExtFactoryComponentInstance.java?rev=1777635&r1=1777634&r2=1777635&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/component/ExtFactoryComponentInstance.java (original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/component/ExtFactoryComponentInstance.java Fri Jan  6 16:13:24 2017
@@ -22,7 +22,7 @@ import java.util.Dictionary;
 
 import org.osgi.service.component.ComponentInstance;
 
-public interface ExtFactoryComponentInstance extends ComponentInstance
+public interface ExtFactoryComponentInstance<S> extends ComponentInstance<S>
 {
     
     void modify( Dictionary<String, ?> properties );

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java?rev=1777635&r1=1777634&r2=1777635&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java (original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java Fri Jan  6 16:13:24 2017
@@ -884,7 +884,8 @@ public abstract class AbstractComponentM
             final Dictionary<String, Object> serviceProperties = getServiceProperties();
             try
             {
-                ServiceRegistration<S> serviceRegistration = (ServiceRegistration<S>) bundleContext.registerService(
+                @SuppressWarnings("unchecked")
+				ServiceRegistration<S> serviceRegistration = (ServiceRegistration<S>) bundleContext.registerService(
                     services, getService(), serviceProperties);
                 return serviceRegistration;
             }
@@ -984,7 +985,7 @@ public abstract class AbstractComponentM
         }
         m_componentMethods.initComponentMethods(getComponentMetadata(), implementationObjectClass);
 
-        for (DependencyManager dependencyManager : m_dependencyManagers)
+        for (DependencyManager<S, ?> dependencyManager : m_dependencyManagers)
         {
             dependencyManager.initBindingMethods(m_componentMethods.getBindMethods(dependencyManager.getName()));
         }
@@ -1128,7 +1129,8 @@ public abstract class AbstractComponentM
             int index = 0;
             for (ReferenceMetadata currentdependency : metadata.getDependencies())
             {
-                DependencyManager<S, ?> depmanager = new DependencyManager(this, currentdependency, index++);
+                @SuppressWarnings({ "unchecked", "rawtypes" })
+				DependencyManager<S, ?> depmanager = new DependencyManager(this, currentdependency, index++);
 
                 depMgrList.add(depmanager);
             }

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ComponentContextImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ComponentContextImpl.java?rev=1777635&r1=1777634&r2=1777635&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ComponentContextImpl.java (original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ComponentContextImpl.java Fri Jan  6 16:13:24 2017
@@ -44,7 +44,7 @@ public class ComponentContextImpl<S> imp
 
     private final EdgeInfo[] edgeInfos;
 
-    private final ComponentInstance m_componentInstance = new ComponentInstanceImpl<S>(this);
+    private final ComponentInstance<S> m_componentInstance = new ComponentInstanceImpl<S>(this);
 
     private final Bundle m_usingBundle;
     
@@ -180,7 +180,7 @@ public class ComponentContextImpl<S> imp
     }
 
 
-    public ComponentInstance getComponentInstance()
+    public ComponentInstance<S> getComponentInstance()
     {
         return m_componentInstance;
     }
@@ -253,7 +253,7 @@ public class ComponentContextImpl<S> imp
         return null;
     }
 
-    private static class ComponentInstanceImpl<S> implements ComponentInstance
+    private static class ComponentInstanceImpl<S> implements ComponentInstance<S>
     {
         private final ComponentContextImpl<S> m_componentContext;
 
@@ -263,7 +263,7 @@ public class ComponentContextImpl<S> imp
         }
 
 
-        public Object getInstance()
+        public S getInstance()
         {
             return m_componentContext.getImplementationObject(true);
         }

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ComponentFactoryImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ComponentFactoryImpl.java?rev=1777635&r1=1777634&r2=1777635&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ComponentFactoryImpl.java (original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ComponentFactoryImpl.java Fri Jan  6 16:13:24 2017
@@ -54,7 +54,7 @@ import org.osgi.service.log.LogService;
  * not all dependencies are present and the created components also persist whether or 
  * not the dependencies are present to allow the component instance to exist.
  */
-public class ComponentFactoryImpl<S> extends AbstractComponentManager<S> implements ComponentFactory, ComponentContainer<S>
+public class ComponentFactoryImpl<S> extends AbstractComponentManager<S> implements ComponentFactory<S>, ComponentContainer<S>
 {
 
     /**
@@ -116,7 +116,7 @@ public class ComponentFactoryImpl<S> ext
     /* (non-Javadoc)
     * @see org.osgi.service.component.ComponentFactory#newInstance(java.util.Dictionary)
     */
-    public ComponentInstance newInstance( Dictionary<String, ?> dictionary )
+    public ComponentInstance<S> newInstance( Dictionary<String, ?> dictionary )
     {
         final SingleComponentManager<S> cm = createComponentManager();
         log( LogService.LOG_DEBUG, "Creating new instance from component factory {0} with configuration {1}",
@@ -128,7 +128,7 @@ public class ComponentFactoryImpl<S> ext
         // enable
         cm.enableInternal();
 
-        ComponentInstance instance;
+        ComponentInstance<S> instance;
         if ( getComponentMetadata().isPersistentFactoryComponent() ) 
         {
             instance = new ModifyComponentInstance<S>(cm);
@@ -152,7 +152,7 @@ public class ComponentFactoryImpl<S> ext
         return instance;
     }
     
-    private static class ModifyComponentInstance<S> implements ExtFactoryComponentInstance
+    private static class ModifyComponentInstance<S> implements ExtFactoryComponentInstance<S>
     {
         private final SingleComponentManager<S> cm;
 
@@ -166,9 +166,9 @@ public class ComponentFactoryImpl<S> ext
             cm.dispose();            
         }
 
-        public Object getInstance()
+        public S getInstance()
         {
-            final ComponentInstance componentInstance = cm.getComponentInstance();
+            final ComponentInstance<S> componentInstance = cm.getComponentInstance();
             return componentInstance == null? null: componentInstance.getInstance();
         }
 

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ConfigurableComponentHolder.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ConfigurableComponentHolder.java?rev=1777635&r1=1777634&r2=1777635&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ConfigurableComponentHolder.java (original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ConfigurableComponentHolder.java Fri Jan  6 16:13:24 2017
@@ -28,12 +28,11 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.apache.felix.scr.impl.helper.ComponentMethods;
 import org.apache.felix.scr.impl.helper.SimpleLogger;
-import org.apache.felix.scr.impl.metadata.ServiceMetadata.Scope;
 import org.apache.felix.scr.impl.metadata.ComponentMetadata;
+import org.apache.felix.scr.impl.metadata.ServiceMetadata.Scope;
 import org.apache.felix.scr.impl.metadata.TargetedPID;
 import org.osgi.framework.Constants;
 import org.osgi.service.component.ComponentConstants;
@@ -753,7 +752,8 @@ public abstract class ConfigurableCompon
             return false;
         }
 
-        ConfigurableComponentHolder<S> other = (ConfigurableComponentHolder<S>) object;
+        @SuppressWarnings("unchecked")
+		ConfigurableComponentHolder<S> other = (ConfigurableComponentHolder<S>) object;
         return m_activator == other.m_activator
             && getName().equals(other.getName());
     }

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/SingleComponentManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/SingleComponentManager.java?rev=1777635&r1=1777634&r2=1777635&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/SingleComponentManager.java (original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/SingleComponentManager.java Fri Jan  6 16:13:24 2017
@@ -165,7 +165,7 @@ public class SingleComponentManager<S> e
     }
 
 
-    public ComponentInstance getComponentInstance()
+    public ComponentInstance<S> getComponentInstance()
     {
         return m_componentContext == null? null: m_componentContext.getComponentInstance();
     }

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/parser/ParseException.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/parser/ParseException.java?rev=1777635&r1=1777634&r2=1777635&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/parser/ParseException.java (original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/parser/ParseException.java Fri Jan  6 16:13:24 2017
@@ -20,7 +20,9 @@ package org.apache.felix.scr.impl.parser
 
 public class ParseException extends Exception
 {
-    public ParseException(String msg, Exception originalException) {
+	private static final long serialVersionUID = 7476908955452692098L;
+
+	public ParseException(String msg, Exception originalException) {
         super(msg, originalException);
     }
     

Added: felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentConstants.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentConstants.java?rev=1777635&view=auto
==============================================================================
--- felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentConstants.java (added)
+++ felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentConstants.java Fri Jan  6 16:13:24 2017
@@ -0,0 +1,154 @@
+/*
+ * Copyright (c) OSGi Alliance (2004, 2016). All Rights Reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.service.component;
+
+import org.osgi.annotation.versioning.ProviderType;
+
+/**
+ * Defines standard names for Service Component constants.
+ * 
+ * @author $Id$
+ */
+@ProviderType
+public interface ComponentConstants {
+	/**
+	 * Manifest header specifying the XML documents within a bundle that contain
+	 * the bundle's Service Component descriptions.
+	 * <p>
+	 * The attribute value may be retrieved from the {@code Dictionary} object
+	 * returned by the {@code Bundle.getHeaders} method.
+	 */
+	public static final String	SERVICE_COMPONENT							= "Service-Component";
+
+	/**
+	 * A component property for a component configuration that contains the name
+	 * of the component as specified in the {@code name} attribute of the
+	 * {@code component} element. The value of this property must be of type
+	 * {@code String}.
+	 */
+	public final static String	COMPONENT_NAME								= "component.name";
+
+	/**
+	 * A component property that contains the generated id for a component
+	 * configuration. The value of this property must be of type {@code Long}.
+	 * 
+	 * <p>
+	 * The value of this property is assigned by Service Component Runtime when
+	 * a component configuration is created. Service Component Runtime assigns a
+	 * unique value that is larger than all previously assigned values since
+	 * Service Component Runtime was started. These values are NOT persistent
+	 * across restarts of Service Component Runtime.
+	 */
+	public final static String	COMPONENT_ID								= "component.id";
+
+	/**
+	 * A service registration property for a Component Factory that contains the
+	 * value of the {@code factory} attribute. The value of this property must
+	 * be of type {@code String}.
+	 */
+	public final static String	COMPONENT_FACTORY							= "component.factory";
+
+	/**
+	 * The suffix for reference target properties. These properties contain the
+	 * filter to select the target services for a reference. The value of this
+	 * property must be of type {@code String}.
+	 */
+	public final static String	REFERENCE_TARGET_SUFFIX						= ".target";
+
+	/**
+	 * The reason the component configuration was deactivated is unspecified.
+	 * 
+	 * @since 1.1
+	 */
+	public static final int		DEACTIVATION_REASON_UNSPECIFIED				= 0;
+
+	/**
+	 * The component configuration was deactivated because the component was
+	 * disabled.
+	 * 
+	 * @since 1.1
+	 */
+	public static final int		DEACTIVATION_REASON_DISABLED				= 1;
+
+	/**
+	 * The component configuration was deactivated because a reference became
+	 * unsatisfied.
+	 * 
+	 * @since 1.1
+	 */
+	public static final int		DEACTIVATION_REASON_REFERENCE				= 2;
+
+	/**
+	 * The component configuration was deactivated because its configuration was
+	 * changed.
+	 * 
+	 * @since 1.1
+	 */
+	public static final int		DEACTIVATION_REASON_CONFIGURATION_MODIFIED	= 3;
+
+	/**
+	 * The component configuration was deactivated because its configuration was
+	 * deleted.
+	 * 
+	 * @since 1.1
+	 */
+	public static final int		DEACTIVATION_REASON_CONFIGURATION_DELETED	= 4;
+
+	/**
+	 * The component configuration was deactivated because the component was
+	 * disposed.
+	 * 
+	 * @since 1.1
+	 */
+	public static final int		DEACTIVATION_REASON_DISPOSED				= 5;
+
+	/**
+	 * The component configuration was deactivated because the bundle was
+	 * stopped.
+	 * 
+	 * @since 1.1
+	 */
+	public static final int		DEACTIVATION_REASON_BUNDLE_STOPPED			= 6;
+
+	/**
+	 * Capability name for Service Component Runtime.
+	 * 
+	 * <p>
+	 * Used in {@code Provide-Capability} and {@code Require-Capability}
+	 * manifest headers with the {@code osgi.extender} namespace. For example:
+	 * 
+	 * <pre>
+	 * Require-Capability: osgi.extender;
+	 *  filter:="(&amp;(osgi.extender=osgi.component)(version&gt;=1.3)(!(version&gt;=2.0)))"
+	 * </pre>
+	 * 
+	 * @since 1.3
+	 */
+	public static final String	COMPONENT_CAPABILITY_NAME					= "osgi.component";
+
+	/**
+	 * Compile time constant for the Specification Version of Declarative
+	 * Services.
+	 * <p>
+	 * Used in {@code Version} and {@code Requirement} annotations. The value of
+	 * this compile time constant will change when the specification version of
+	 * Declarative Services is updated.
+	 * 
+	 * @since 1.4
+	 */
+	public static final String	COMPONENT_SPECIFICATION_VERSION				= "1.4.0";
+}

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentConstants.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentConstants.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Added: felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentContext.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentContext.java?rev=1777635&view=auto
==============================================================================
--- felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentContext.java (added)
+++ felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentContext.java Fri Jan  6 16:13:24 2017
@@ -0,0 +1,184 @@
+/*
+ * Copyright (c) OSGi Alliance (2004, 2016). All Rights Reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.service.component;
+
+import java.util.Dictionary;
+
+import org.osgi.annotation.versioning.ProviderType;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * A Component Context object is used by a component instance to interact with
+ * its execution context including locating services by reference name. Each
+ * component instance has a unique Component Context.
+ * 
+ * <p>
+ * A component instance may obtain its Component Context object through its
+ * activate, modified, and deactivate methods.
+ * 
+ * @ThreadSafe
+ * @author $Id$
+ */
+@ProviderType
+public interface ComponentContext {
+	/**
+	 * Returns the component properties for this Component Context.
+	 * 
+	 * @return The properties for this Component Context. The Dictionary is read
+	 *         only and cannot be modified.
+	 */
+	public Dictionary<String, Object> getProperties();
+
+	/**
+	 * Returns the service object for the specified reference name.
+	 * 
+	 * <p>
+	 * If the cardinality of the reference is {@code 0..n} or {@code 1..n} and
+	 * multiple services are bound to the reference, the service with the
+	 * highest ranking (as specified in its {@code Constants.SERVICE_RANKING}
+	 * property) is returned. If there is a tie in ranking, the service with the
+	 * lowest service id (as specified in its {@code Constants.SERVICE_ID}
+	 * property); that is, the service that was registered first is returned.
+	 * 
+	 * @param name The name of a reference as specified in a {@code reference}
+	 *        element in this component's description.
+	 * @return A service object for the referenced service or {@code null} if
+	 *         the reference cardinality is {@code 0..1} or {@code 0..n} and no
+	 *         bound service is available.
+	 * @throws ComponentException If Service Component Runtime catches an
+	 *         exception while activating the bound service.
+	 */
+	public <S> S locateService(String name);
+
+	/**
+	 * Returns the service object for the specified reference name and
+	 * {@code ServiceReference}.
+	 * 
+	 * @param <S> Type of Service.
+	 * @param name The name of a reference as specified in a {@code reference}
+	 *        element in this component's description.
+	 * @param reference The {@code ServiceReference} to a bound service. This
+	 *        must be a {@code ServiceReference} provided to the component via
+	 *        the bind or unbind method for the specified reference name.
+	 * @return A service object for the referenced service or {@code null} if
+	 *         the specified {@code ServiceReference} is not a bound service for
+	 *         the specified reference name.
+	 * @throws ComponentException If Service Component Runtime catches an
+	 *         exception while activating the bound service.
+	 */
+	public <S> S locateService(String name, ServiceReference<S> reference);
+
+	/**
+	 * Returns the service objects for the specified reference name.
+	 * 
+	 * @param name The name of a reference as specified in a {@code reference}
+	 *        element in this component's description.
+	 * @return An array of service objects for the referenced service or
+	 *         {@code null} if the reference cardinality is {@code 0..1} or
+	 *         {@code 0..n} and no bound service is available. If the reference
+	 *         cardinality is {@code 0..1} or {@code 1..1} and a bound service
+	 *         is available, the array will have exactly one element.
+	 * @throws ComponentException If Service Component Runtime catches an
+	 *         exception while activating a bound service.
+	 */
+	public Object[] locateServices(String name);
+
+	/**
+	 * Returns the {@code BundleContext} of the bundle which contains this
+	 * component.
+	 * 
+	 * @return The {@code BundleContext} of the bundle containing this
+	 *         component.
+	 */
+	public BundleContext getBundleContext();
+
+	/**
+	 * If the component instance is registered as a service using the
+	 * {@code servicescope="bundle"} or {@code servicescope="prototype"}
+	 * attribute, then this method returns the bundle using the service provided
+	 * by the component instance.
+	 * <p>
+	 * This method will return {@code null} if:
+	 * <ul>
+	 * <li>The component instance is not a service, then no bundle can be using
+	 * it as a service.</li>
+	 * <li>The component instance is a service but did not specify the
+	 * {@code servicescope="bundle"} or {@code servicescope="prototype"}
+	 * attribute, then all bundles using the service provided by the component
+	 * instance will share the same component instance.</li>
+	 * <li>The service provided by the component instance is not currently being
+	 * used by any bundle.</li>
+	 * </ul>
+	 * 
+	 * @return The bundle using the component instance as a service or
+	 *         {@code null}.
+	 */
+	public Bundle getUsingBundle();
+
+	/**
+	 * Returns the Component Instance object for the component instance
+	 * associated with this Component Context.
+	 * 
+	 * @return The Component Instance object for the component instance.
+	 */
+	public <S> ComponentInstance<S> getComponentInstance();
+
+	/**
+	 * Enables the specified component name. The specified component name must
+	 * be in the same bundle as this component.
+	 * 
+	 * <p>
+	 * This method must return after changing the enabled state of the specified
+	 * component name. Any actions that result from this, such as activating or
+	 * deactivating a component configuration, must occur asynchronously to this
+	 * method call.
+	 * 
+	 * @param name The name of a component or {@code null} to indicate all
+	 *        components in the bundle.
+	 */
+	public void enableComponent(String name);
+
+	/**
+	 * Disables the specified component name. The specified component name must
+	 * be in the same bundle as this component.
+	 * 
+	 * <p>
+	 * This method must return after changing the enabled state of the specified
+	 * component name. Any actions that result from this, such as activating or
+	 * deactivating a component configuration, must occur asynchronously to this
+	 * method call.
+	 * 
+	 * @param name The name of a component.
+	 */
+	public void disableComponent(String name);
+
+	/**
+	 * If the component instance is registered as a service using the
+	 * {@code service} element, then this method returns the service reference
+	 * of the service provided by this component instance.
+	 * <p>
+	 * This method will return {@code null} if the component instance is not
+	 * registered as a service.
+	 * 
+	 * @return The {@code ServiceReference} object for the component instance or
+	 *         {@code null} if the component instance is not registered as a
+	 *         service.
+	 */
+	public ServiceReference<?> getServiceReference();
+}

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentContext.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Added: felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentException.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentException.java?rev=1777635&view=auto
==============================================================================
--- felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentException.java (added)
+++ felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentException.java Fri Jan  6 16:13:24 2017
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) OSGi Alliance (2004, 2014). All Rights Reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.service.component;
+
+/**
+ * Unchecked exception which may be thrown by Service Component Runtime.
+ * 
+ * @author $Id$
+ */
+public class ComponentException extends RuntimeException {
+	static final long	serialVersionUID	= -7438212656298726924L;
+
+	/**
+	 * Construct a new ComponentException with the specified message and cause.
+	 * 
+	 * @param message The message for the exception.
+	 * @param cause The cause of the exception. May be {@code null}.
+	 */
+	public ComponentException(String message, Throwable cause) {
+		super(message, cause);
+	}
+
+	/**
+	 * Construct a new ComponentException with the specified message.
+	 * 
+	 * @param message The message for the exception.
+	 */
+	public ComponentException(String message) {
+		super(message);
+	}
+
+	/**
+	 * Construct a new ComponentException with the specified cause.
+	 * 
+	 * @param cause The cause of the exception. May be {@code null}.
+	 */
+	public ComponentException(Throwable cause) {
+		super(cause);
+	}
+
+	/**
+	 * Returns the cause of this exception or {@code null} if no cause was set.
+	 * 
+	 * @return The cause of this exception or {@code null} if no cause was set.
+	 */
+	@Override
+	public Throwable getCause() {
+		return super.getCause();
+	}
+
+	/**
+	 * Initializes the cause of this exception to the specified value.
+	 * 
+	 * @param cause The cause of this exception.
+	 * @return This exception.
+	 * @throws IllegalArgumentException If the specified cause is this
+	 *         exception.
+	 * @throws IllegalStateException If the cause of this exception has already
+	 *         been set.
+	 */
+	@Override
+	public Throwable initCause(Throwable cause) {
+		return super.initCause(cause);
+	}
+}

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentException.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Added: felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentFactory.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentFactory.java?rev=1777635&view=auto
==============================================================================
--- felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentFactory.java (added)
+++ felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentFactory.java Fri Jan  6 16:13:24 2017
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) OSGi Alliance (2004, 2016). All Rights Reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.service.component;
+
+import java.util.Dictionary;
+
+import org.osgi.annotation.versioning.ProviderType;
+
+/**
+ * When a component is declared with the {@code factory} attribute on its
+ * {@code component} element, Service Component Runtime will register a
+ * Component Factory service to allow new component configurations to be created
+ * and activated rather than automatically creating and activating component
+ * configuration as necessary.
+ * 
+ * @param <S> Type of Service
+ * @ThreadSafe
+ * @author $Id$
+ */
+@ProviderType
+public interface ComponentFactory<S> {
+	/**
+	 * Create and activate a new component configuration. Additional properties
+	 * may be provided for the component configuration.
+	 * 
+	 * @param properties Additional properties for the component configuration
+	 *        or {@code null} if there are no additional properties.
+	 * @return A {@code ComponentInstance} object encapsulating the component
+	 *         instance of the component configuration. The component
+	 *         configuration has been activated and, if the component specifies
+	 *         a {@code service} element, the component instance has been
+	 *         registered as a service.
+	 * @throws ComponentException If Service Component Runtime is unable to
+	 *         activate the component configuration.
+	 */
+	public ComponentInstance<S> newInstance(Dictionary<String, ? > properties);
+}

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentFactory.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Added: felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentInstance.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentInstance.java?rev=1777635&view=auto
==============================================================================
--- felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentInstance.java (added)
+++ felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentInstance.java Fri Jan  6 16:13:24 2017
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) OSGi Alliance (2004, 2016). All Rights Reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.service.component;
+
+import org.osgi.annotation.versioning.ProviderType;
+
+/**
+ * A ComponentInstance encapsulates a component instance of an activated
+ * component configuration. ComponentInstances are created whenever a component
+ * configuration is activated.
+ * <p>
+ * ComponentInstances are never reused. A new ComponentInstance object will be
+ * created when the component configuration is activated again.
+ * 
+ * @param <S> Type of Service
+ * @ThreadSafe
+ * @author $Id$
+ */
+@ProviderType
+public interface ComponentInstance<S> {
+	/**
+	 * Dispose of the component configuration for this component instance. The
+	 * component configuration will be deactivated. If the component
+	 * configuration has already been deactivated, this method does nothing.
+	 */
+	public void dispose();
+
+	/**
+	 * Returns the component instance of the activated component configuration.
+	 * 
+	 * @return The component instance or {@code null} if the component
+	 *         configuration has been deactivated.
+	 */
+	public S getInstance();
+}

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentInstance.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentInstance.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Added: felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentServiceObjects.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentServiceObjects.java?rev=1777635&view=auto
==============================================================================
--- felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentServiceObjects.java (added)
+++ felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentServiceObjects.java Fri Jan  6 16:13:24 2017
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) OSGi Alliance (2012, 2016). All Rights Reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.service.component;
+
+import org.osgi.annotation.versioning.ProviderType;
+import org.osgi.framework.Constants;
+import org.osgi.framework.ServiceObjects;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * Allows multiple service objects for a service to be obtained.
+ * 
+ * <p>
+ * A component instance can receive a {@code ComponentServiceObjects} object via
+ * a reference that is typed {@code ComponentServiceObjects}.
+ * 
+ * <p>
+ * For services with {@link Constants#SCOPE_PROTOTYPE prototype} scope, multiple
+ * service objects for the service can be obtained. For services with
+ * {@link Constants#SCOPE_SINGLETON singleton} or {@link Constants#SCOPE_BUNDLE
+ * bundle} scope, only one, use-counted service object is available.
+ * 
+ * <p>
+ * Any unreleased service objects obtained from this
+ * {@code ComponentServiceObjects} object are automatically released by Service
+ * Component Runtime when the service becomes unbound.
+ * 
+ * @param <S> Type of Service
+ * @ThreadSafe
+ * @since 1.3
+ * @see ServiceObjects
+ * @author $Id$
+ */
+@ProviderType
+public interface ComponentServiceObjects<S> {
+	/**
+	 * Returns a service object for the {@link #getServiceReference()
+	 * associated} service.
+	 * <p>
+	 * This method will always return {@code null} when the associated service
+	 * has been become unbound.
+	 * 
+	 * @return A service object for the associated service or {@code null} if
+	 *         the service is unbound, the customized service object returned by
+	 *         a {@code ServiceFactory} does not implement the classes under
+	 *         which it was registered or the {@code ServiceFactory} threw an
+	 *         exception.
+	 * @throws IllegalStateException If the component instance that received
+	 *             this {@code ComponentServiceObjects} object has been
+	 *             deactivated.
+	 * @see #ungetService(Object)
+	 */
+	public S getService();
+
+	/**
+	 * Releases a service object for the {@link #getServiceReference()
+	 * associated} service.
+	 * <p>
+	 * The specified service object must no longer be used and all references to
+	 * it should be destroyed after calling this method.
+	 * 
+	 * @param service A service object previously provided by this
+	 *        {@code ComponentServiceObjects} object.
+	 * @throws IllegalStateException If the component instance that received
+	 *             this {@code ComponentServiceObjects} object has been
+	 *             deactivated.
+	 * @throws IllegalArgumentException If the specified service object was not
+	 *         provided by this {@code ComponentServiceObjects} object.
+	 * @see #getService()
+	 */
+	public void ungetService(S service);
+
+	/**
+	 * Returns the {@link ServiceReference} for the service associated with this
+	 * {@code ComponentServiceObjects} object.
+	 * 
+	 * @return The {@link ServiceReference} for the service associated with this
+	 *         {@code ComponentServiceObjects} object.
+	 */
+	public ServiceReference<S> getServiceReference();
+}

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentServiceObjects.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentServiceObjects.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Added: felix/trunk/scr/src/main/java/org/osgi/service/component/package-info.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/osgi/service/component/package-info.java?rev=1777635&view=auto
==============================================================================
--- felix/trunk/scr/src/main/java/org/osgi/service/component/package-info.java (added)
+++ felix/trunk/scr/src/main/java/org/osgi/service/component/package-info.java Fri Jan  6 16:13:24 2017
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) OSGi Alliance (2010, 2016). All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Service Component Package Version 1.4.
+ * <p>
+ * Bundles wishing to use this package must list the package in the
+ * Import-Package header of the bundle's manifest. This package has two types of
+ * users: the consumers that use the API in this package and the providers that
+ * implement the API in this package.
+ * <p>
+ * Example import for consumers using the API in this package:
+ * <p>
+ * {@code  Import-Package: org.osgi.service.component; version="[1.4,2.0)"}
+ * <p>
+ * Example import for providers implementing the API in this package:
+ * <p>
+ * {@code  Import-Package: org.osgi.service.component; version="[1.4,1.5)"}
+ *
+ * @author $Id$
+ */
+
+@Version(COMPONENT_SPECIFICATION_VERSION)
+package org.osgi.service.component;
+
+import static org.osgi.service.component.ComponentConstants.COMPONENT_SPECIFICATION_VERSION;
+
+import org.osgi.annotation.versioning.Version;
+

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/package-info.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Added: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/ServiceComponentRuntime.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/ServiceComponentRuntime.java?rev=1777635&view=auto
==============================================================================
--- felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/ServiceComponentRuntime.java (added)
+++ felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/ServiceComponentRuntime.java Fri Jan  6 16:13:24 2017
@@ -0,0 +1,165 @@
+/*
+ * Copyright (c) OSGi Alliance (2013, 2016). All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.service.component.runtime;
+
+import java.util.Collection;
+
+import org.osgi.annotation.versioning.ProviderType;
+import org.osgi.framework.Bundle;
+import org.osgi.service.component.ComponentContext;
+import org.osgi.service.component.runtime.dto.ComponentConfigurationDTO;
+import org.osgi.service.component.runtime.dto.ComponentDescriptionDTO;
+import org.osgi.util.promise.Promise;
+
+/**
+ * The {@code ServiceComponentRuntime} service represents the Declarative
+ * Services actor, known as Service Component Runtime (SCR), that manages the
+ * service components and their life cycle. The {@code ServiceComponentRuntime}
+ * service allows introspection of the components managed by Service Component
+ * Runtime.
+ * 
+ * <p>
+ * This service differentiates between a {@link ComponentDescriptionDTO} and a
+ * {@link ComponentConfigurationDTO}. A {@link ComponentDescriptionDTO} is a
+ * representation of a declared component description. A
+ * {@link ComponentConfigurationDTO} is a representation of an actual instance
+ * of a declared component description parameterized by component properties.
+ * <p>
+ * 
+ * Access to this service requires the
+ * {@code ServicePermission[ServiceComponentRuntime, GET]} permission. It is
+ * intended that only administrative bundles should be granted this permission
+ * to limit access to the potentially intrusive methods provided by this
+ * service.
+ * 
+ * @ThreadSafe
+ * @since 1.3
+ * @author $Id$
+ */
+@ProviderType
+public interface ServiceComponentRuntime {
+
+	/**
+	 * Returns the component descriptions declared by the specified active
+	 * bundles.
+	 * 
+	 * <p>
+	 * Only component descriptions from active bundles are returned. If the
+	 * specified bundles have no declared components or are not active, an empty
+	 * collection is returned.
+	 * 
+	 * @param bundles The bundles whose declared component descriptions are to
+	 *        be returned. Specifying no bundles, or the equivalent of an empty
+	 *        {@code Bundle} array, will return the declared component
+	 *        descriptions from all active bundles.
+	 * @return The declared component descriptions of the specified active
+	 *         {@code bundles}. An empty collection is returned if there are no
+	 *         component descriptions for the specified active bundles.
+	 */
+	Collection<ComponentDescriptionDTO> getComponentDescriptionDTOs(Bundle... bundles);
+
+	/**
+	 * Returns the {@link ComponentDescriptionDTO} declared with the specified name
+	 * by the specified bundle.
+	 * 
+	 * <p>
+	 * Only component descriptions from active bundles are returned.
+	 * {@code null} if no such component is declared by the given {@code bundle}
+	 * or the bundle is not active.
+	 * 
+	 * @param bundle The bundle declaring the component description. Must not be
+	 *        {@code null}.
+	 * @param name The name of the component description. Must not be
+	 *        {@code null}.
+	 * @return The declared component description or {@code null} if the
+	 *         specified bundle is not active or does not declare a component
+	 *         description with the specified name.
+	 */
+	ComponentDescriptionDTO getComponentDescriptionDTO(Bundle bundle, String name);
+
+	/**
+	 * Returns the component configurations for the specified component
+	 * description.
+	 * 
+	 * @param description The component description. Must not be {@code null}.
+	 * @return A collection containing a snapshot of the current component
+	 *         configurations for the specified component description. An empty
+	 *         collection is returned if there are none or if the provided
+	 *         component description does not belong to an active bundle.
+	 */
+	Collection<ComponentConfigurationDTO> getComponentConfigurationDTOs(ComponentDescriptionDTO description);
+
+	/**
+	 * Returns whether the specified component description is currently enabled.
+	 * 
+	 * <p>
+	 * The enabled state of a component description is initially set by the
+	 * {@link ComponentDescriptionDTO#defaultEnabled enabled} attribute of the
+	 * component description.
+	 * 
+	 * @param description The component description. Must not be {@code null}.
+	 * @return {@code true} if the specified component description is currently
+	 *         enabled. Otherwise, {@code false}.
+	 * @see #enableComponent(ComponentDescriptionDTO)
+	 * @see #disableComponent(ComponentDescriptionDTO)
+	 * @see ComponentContext#disableComponent(String)
+	 * @see ComponentContext#enableComponent(String)
+	 */
+	boolean isComponentEnabled(ComponentDescriptionDTO description);
+
+	/**
+	 * Enables the specified component description.
+	 * <p>
+	 * If the specified component description is currently enabled, this method
+	 * has no effect.
+	 * <p>
+	 * This method must return after changing the enabled state of the specified
+	 * component description. Any actions that result from this, such as
+	 * activating or deactivating a component configuration, must occur
+	 * asynchronously to this method call.
+	 * 
+	 * @param description The component description to enable. Must not be
+	 *            {@code null}.
+	 * @return A promise that will be resolved when the actions that result from
+	 *         changing the enabled state of the specified component have
+	 *         completed. If the provided description does not belong to an
+	 *         active bundle, a failed promise is returned.
+	 * @see #isComponentEnabled(ComponentDescriptionDTO)
+	 */
+	Promise<Void> enableComponent(ComponentDescriptionDTO description);
+
+	/**
+	 * Disables the specified component description.
+	 * <p>
+	 * If the specified component description is currently disabled, this method
+	 * has no effect.
+	 * <p>
+	 * This method must return after changing the enabled state of the specified
+	 * component description. Any actions that result from this, such as
+	 * activating or deactivating a component configuration, must occur
+	 * asynchronously to this method call.
+	 * 
+	 * @param description The component description to disable. Must not be
+	 *            {@code null}.
+	 * @return A promise that will be resolved when the actions that result from
+	 *         changing the enabled state of the specified component have
+	 *         completed. If the provided description does not belong to an
+	 *         active bundle, a failed promise is returned.
+	 * @see #isComponentEnabled(ComponentDescriptionDTO)
+	 */
+	Promise<Void> disableComponent(ComponentDescriptionDTO description);
+}

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/ServiceComponentRuntime.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/ServiceComponentRuntime.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/ServiceComponentRuntime.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Added: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ComponentConfigurationDTO.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ComponentConfigurationDTO.java?rev=1777635&view=auto
==============================================================================
--- felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ComponentConfigurationDTO.java (added)
+++ felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ComponentConfigurationDTO.java Fri Jan  6 16:13:24 2017
@@ -0,0 +1,150 @@
+/*
+ * Copyright (c) OSGi Alliance (2013, 2016). All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.service.component.runtime.dto;
+
+import java.util.Map;
+
+import org.osgi.dto.DTO;
+import org.osgi.service.component.ComponentContext;
+
+/**
+ * A representation of an actual instance of a declared component description
+ * parameterized by component properties.
+ * 
+ * @since 1.3
+ * @NotThreadSafe
+ * @author $Id$
+ */
+public class ComponentConfigurationDTO extends DTO {
+	/**
+	 * The component configuration is unsatisfied due to a missing required
+	 * configuration.
+	 */
+	public static final int			UNSATISFIED_CONFIGURATION	= 1;
+
+	/**
+	 * The component configuration is unsatisfied due to an unsatisfied
+	 * reference.
+	 */
+	public static final int			UNSATISFIED_REFERENCE		= 2;
+
+	/**
+	 * The component configuration is satisfied.
+	 * 
+	 * <p>
+	 * Any {@link ComponentDescriptionDTO#serviceInterfaces services} declared
+	 * by the component description are registered.
+	 */
+	public static final int			SATISFIED					= 4;
+
+	/**
+	 * The component configuration is active.
+	 * 
+	 * <p>
+	 * This is the normal operational state of a component configuration.
+	 */
+	public static final int			ACTIVE						= 8;
+
+	/**
+	 * The component configuration failed to activate.
+	 * <p>
+	 * This means the component configuration is satisfied but that either:
+	 * <ul>
+	 * <li>an exception occurred loading the implementation class,</li>
+	 * <li>the static initializer threw an exception,</li>
+	 * <li>the constructor threw an exception, or</li>
+	 * <li>the activate method threw an exception.</li>
+	 * </ul>
+	 * The failure information from the exception is available from
+	 * {@link #failure}.
+	 * 
+	 * @since 1.4
+	 */
+	public static final int				FAILED_ACTIVATION			= 16;
+
+	/**
+	 * The representation of the component configuration's component
+	 * description.
+	 */
+	public ComponentDescriptionDTO	description;
+
+	/**
+	 * The current state of the component configuration.
+	 * <p>
+	 * This is one of {@link #UNSATISFIED_CONFIGURATION},
+	 * {@link #UNSATISFIED_REFERENCE}, {@link #SATISFIED}, {@link #ACTIVE}, or
+	 * {@link #FAILED_ACTIVATION}.
+	 */
+	public int							state;
+
+	/**
+	 * The id of the component configuration.
+	 * 
+	 * <p>
+	 * The id is a non-persistent, unique value assigned at runtime. The id is
+	 * also available as the {@code component.id} component property. The value
+	 * of this field is unspecified if the state of this component configuration
+	 * is unsatisfied.
+	 */
+	public long							id;
+
+	/**
+	 * The component properties for the component configuration.
+	 * 
+	 * @see ComponentContext#getProperties()
+	 */
+	public Map<String, Object>	properties;
+
+	/**
+	 * The satisfied references.
+	 * 
+	 * <p>
+	 * Each {@link SatisfiedReferenceDTO} in the array represents a satisfied
+	 * reference of the component configuration. The array must be empty if the
+	 * component configuration has no satisfied references.
+	 */
+	public SatisfiedReferenceDTO[]		satisfiedReferences;
+
+	/**
+	 * The unsatisfied references.
+	 * 
+	 * <p>
+	 * Each {@link UnsatisfiedReferenceDTO} in the array represents an
+	 * unsatisfied reference of the component configuration. The array must be
+	 * empty if the component configuration has no unsatisfied references.
+	 */
+	public UnsatisfiedReferenceDTO[]	unsatisfiedReferences;
+
+	/**
+	 * The failure information if the component configuration state is
+	 * {@link #FAILED_ACTIVATION}.
+	 * <p>
+	 * This is the failure exception converted to a String using:
+	 * 
+	 * <pre>
+	 * StringWriter sw = new StringWriter();
+	 * exception.printStackTrace(new PrintWriter(sw));
+	 * sw.toString();
+	 * </pre>
+	 * 
+	 * This must be {@code null} if the component configuration state is not
+	 * {@link #FAILED_ACTIVATION}.
+	 * 
+	 * @since 1.4
+	 */
+	public String						failure;
+}

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ComponentConfigurationDTO.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ComponentConfigurationDTO.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ComponentConfigurationDTO.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Added: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ComponentDescriptionDTO.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ComponentDescriptionDTO.java?rev=1777635&view=auto
==============================================================================
--- felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ComponentDescriptionDTO.java (added)
+++ felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ComponentDescriptionDTO.java Fri Jan  6 16:13:24 2017
@@ -0,0 +1,184 @@
+/*
+ * Copyright (c) OSGi Alliance (2013, 2016). All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.service.component.runtime.dto;
+
+import java.util.Map;
+
+import org.osgi.dto.DTO;
+import org.osgi.framework.dto.BundleDTO;
+
+/**
+ * A representation of a declared component description.
+ * 
+ * @since 1.3
+ * @NotThreadSafe
+ * @author $Id$
+ */
+public class ComponentDescriptionDTO extends DTO {
+	/**
+	 * The name of the component.
+	 * 
+	 * <p>
+	 * This is declared in the {@code name} attribute of the {@code component}
+	 * element. This must be the default name if the component description does
+	 * not declare a name.
+	 */
+	public String				name;
+
+	/**
+	 * The bundle declaring the component description.
+	 */
+	public BundleDTO			bundle;
+
+	/**
+	 * The component factory name.
+	 * 
+	 * <p>
+	 * This is declared in the {@code factory} attribute of the
+	 * {@code component} element. This must be {@code null} if the component
+	 * description is not declared as a factory component.
+	 */
+	public String				factory;
+
+	/**
+	 * The service scope.
+	 * 
+	 * <p>
+	 * This is declared in the {@code scope} attribute of the {@code service}
+	 * element. This must be {@code null} if the component description does not
+	 * declare any service interfaces.
+	 */
+	public String				scope;
+
+	/**
+	 * The fully qualified name of the implementation class.
+	 * 
+	 * <p>
+	 * This is declared in the {@code class} attribute of the
+	 * {@code implementation} element.
+	 */
+	public String				implementationClass;
+
+	/**
+	 * The initial enabled state.
+	 * 
+	 * <p>
+	 * This is declared in the {@code enabled} attribute of the
+	 * {@code component} element.
+	 */
+	public boolean				defaultEnabled;
+
+	/**
+	 * The immediate state.
+	 * 
+	 * <p>
+	 * This is declared in the {@code immediate} attribute of the
+	 * {@code component} element.
+	 */
+	public boolean				immediate;
+
+	/**
+	 * The fully qualified names of the service interfaces.
+	 * 
+	 * <p>
+	 * These are declared in the {@code interface} attribute of the
+	 * {@code provide} elements. The array must be empty if the component
+	 * description does not declare any service interfaces.
+	 */
+	public String[]				serviceInterfaces;
+
+	/**
+	 * The component properties.
+	 * <p>
+	 * These are declared in the component description by the {@code property}
+	 * and {@code properties} elements as well as the {@code target} attribute
+	 * of the {@code reference} elements.
+	 */
+	public Map<String, Object>	properties;
+
+	/**
+	 * The referenced services.
+	 * 
+	 * <p>
+	 * These are declared in the {@code reference} elements. The array must be
+	 * empty if the component description does not declare references to any
+	 * services.
+	 */
+	public ReferenceDTO[]			references;
+
+	/**
+	 * The name of the activate method.
+	 * 
+	 * <p>
+	 * This is declared in the {@code activate} attribute of the
+	 * {@code component} element. This must be {@code null} if the component
+	 * description does not declare an activate method name.
+	 */
+	public String				activate;
+
+	/**
+	 * The name of the deactivate method.
+	 * 
+	 * <p>
+	 * This is declared in the {@code deactivate} attribute of the
+	 * {@code component} element. This must be {@code null} if the component
+	 * description does not declare a deactivate method name.
+	 */
+	public String				deactivate;
+
+	/**
+	 * The name of the modified method.
+	 * 
+	 * <p>
+	 * This is declared in the {@code modified} attribute of the
+	 * {@code component} element. This must be {@code null} if the component
+	 * description does not declare a modified method name.
+	 */
+	public String				modified;
+
+	/**
+	 * The configuration policy.
+	 * 
+	 * <p>
+	 * This is declared in the {@code configuration-policy} attribute of the
+	 * {@code component} element. This must be the default configuration policy
+	 * if the component description does not declare a configuration policy.
+	 */
+	public String				configurationPolicy;
+
+	/**
+	 * The configuration pids.
+	 * 
+	 * <p>
+	 * These are declared in the {@code configuration-pid} attribute of the
+	 * {@code component} element. This must contain the default configuration
+	 * pid if the component description does not declare a configuration pid.
+	 */
+	public String[]				configurationPid;
+
+	/**
+	 * The factory properties.
+	 * <p>
+	 * These are declared in the component description by the
+	 * {@code factoryProperty} and {@code factoryProperties} elements. This must
+	 * be {@code null} if the component description is not declared as a
+	 * {@link #factory factory component}.
+	 * 
+	 * @since 1.4
+	 */
+	public Map<String,Object>	factoryProperties;
+}

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ComponentDescriptionDTO.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ComponentDescriptionDTO.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ComponentDescriptionDTO.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Added: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ReferenceDTO.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ReferenceDTO.java?rev=1777635&view=auto
==============================================================================
--- felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ReferenceDTO.java (added)
+++ felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ReferenceDTO.java Fri Jan  6 16:13:24 2017
@@ -0,0 +1,171 @@
+/*
+ * Copyright (c) OSGi Alliance (2013, 2016). All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.service.component.runtime.dto;
+
+import org.osgi.dto.DTO;
+
+/**
+ * A representation of a declared reference to a service.
+ * 
+ * @since 1.3
+ * @NotThreadSafe
+ * @author $Id$
+ */
+public class ReferenceDTO extends DTO {
+
+	/**
+	 * The name of the reference.
+	 * 
+	 * <p>
+	 * This is declared in the {@code name} attribute of the {@code reference}
+	 * element. This must be the default name if the component description does
+	 * not declare a name for the reference.
+	 */
+	public String	name;
+
+	/**
+	 * The service interface of the reference.
+	 * 
+	 * <p>
+	 * This is declared in the {@code interface} attribute of the
+	 * {@code reference} element.
+	 */
+	public String	interfaceName;
+
+	/**
+	 * The cardinality of the reference.
+	 * 
+	 * <p>
+	 * This is declared in the {@code cardinality} attribute of the
+	 * {@code reference} element. This must be the default cardinality if the
+	 * component description does not declare a cardinality for the reference.
+	 */
+	public String	cardinality;
+
+	/**
+	 * The policy of the reference.
+	 * 
+	 * <p>
+	 * This is declared in the {@code policy} attribute of the {@code reference}
+	 * element. This must be the default policy if the component description
+	 * does not declare a policy for the reference.
+	 */
+	public String	policy;
+
+	/**
+	 * The policy option of the reference.
+	 * 
+	 * <p>
+	 * This is declared in the {@code policy-option} attribute of the
+	 * {@code reference} element. This must be the default policy option if the
+	 * component description does not declare a policy option for the reference.
+	 */
+	public String	policyOption;
+
+	/**
+	 * The target of the reference.
+	 * 
+	 * <p>
+	 * This is declared in the {@code target} attribute of the {@code reference}
+	 * element. This must be {@code null} if the component description does not
+	 * declare a target for the reference.
+	 */
+	public String	target;
+
+	/**
+	 * The name of the bind method of the reference.
+	 * 
+	 * <p>
+	 * This is declared in the {@code bind} attribute of the {@code reference}
+	 * element. This must be {@code null} if the component description does not
+	 * declare a bind method for the reference.
+	 */
+	public String	bind;
+
+	/**
+	 * The name of the unbind method of the reference.
+	 * 
+	 * <p>
+	 * This is declared in the {@code unbind} attribute of the {@code reference}
+	 * element. This must be {@code null} if the component description does not
+	 * declare an unbind method for the reference.
+	 */
+	public String	unbind;
+
+	/**
+	 * The name of the updated method of the reference.
+	 * 
+	 * <p>
+	 * This is declared in the {@code updated} attribute of the
+	 * {@code reference} element. This must be {@code null} if the component
+	 * description does not declare an updated method for the reference.
+	 */
+	public String	updated;
+
+	/**
+	 * The name of the field of the reference.
+	 * 
+	 * <p>
+	 * This is declared in the {@code field} attribute of the {@code reference}
+	 * element. This must be {@code null} if the component description does not
+	 * declare a field for the reference.
+	 */
+	public String	field;
+
+	/**
+	 * The field option of the reference.
+	 * 
+	 * <p>
+	 * This is declared in the {@code field-option} attribute of the
+	 * {@code reference} element. This must be {@code null} if the component
+	 * description does not declare a field for the reference.
+	 */
+	public String	fieldOption;
+
+	/**
+	 * The scope of the reference.
+	 * 
+	 * <p>
+	 * This is declared in the {@code scope} attribute of the {@code reference}
+	 * element. This must be the default scope if the component description does
+	 * not declare a scope for the reference.
+	 */
+	public String	scope;
+
+	/**
+	 * The zero-based parameter number of the constructor parameter for the
+	 * reference.
+	 * <p>
+	 * This is declared in the {@code parameter} attribute of the
+	 * {@code reference} element. This must be zero if the component description
+	 * does not declare a parameter number for the reference.
+	 * 
+	 * @since 1.4
+	 */
+	public int		parameter;
+
+	/**
+	 * The collection type for the reference.
+	 * <p>
+	 * This is declared in the {@code field-collection-type} attribute of the
+	 * {@code reference} element. This must be {@code null} if the component
+	 * description does not declare a collection type for the reference.
+	 * 
+	 * @since 1.4
+	 */
+	public String	collectionType;
+}

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ReferenceDTO.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ReferenceDTO.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ReferenceDTO.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Added: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/SatisfiedReferenceDTO.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/SatisfiedReferenceDTO.java?rev=1777635&view=auto
==============================================================================
--- felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/SatisfiedReferenceDTO.java (added)
+++ felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/SatisfiedReferenceDTO.java Fri Jan  6 16:13:24 2017
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) OSGi Alliance (2013, 2014). All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.service.component.runtime.dto;
+
+import org.osgi.dto.DTO;
+import org.osgi.framework.dto.ServiceReferenceDTO;
+
+/**
+ * A representation of a satisfied reference.
+ * 
+ * @since 1.3
+ * @NotThreadSafe
+ * @author $Id$
+ */
+public class SatisfiedReferenceDTO extends DTO {
+	/**
+	 * The name of the declared reference.
+	 * 
+	 * <p>
+	 * This is declared in the {@code name} attribute of the {@code reference}
+	 * element of the component description.
+	 * 
+	 * @see ReferenceDTO#name
+	 */
+	public String					name;
+
+	/**
+	 * The target property of the satisfied reference.
+	 * 
+	 * <p>
+	 * This is the value of the {@link ComponentConfigurationDTO#properties
+	 * component property} whose name is the concatenation of the
+	 * {@link ReferenceDTO#name declared reference name} and
+	 * &quot;.target&quot;. This must be {@code null} if no target property is
+	 * set for the reference.
+	 */
+	public String					target;
+
+	/**
+	 * The bound services.
+	 * 
+	 * <p>
+	 * Each {@link ServiceReferenceDTO} in the array represents a service bound
+	 * to the satisfied reference. The array must be empty if there are no bound
+	 * services.
+	 */
+	public ServiceReferenceDTO[]	boundServices;
+}

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/SatisfiedReferenceDTO.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/SatisfiedReferenceDTO.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/SatisfiedReferenceDTO.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Added: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/UnsatisfiedReferenceDTO.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/UnsatisfiedReferenceDTO.java?rev=1777635&view=auto
==============================================================================
--- felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/UnsatisfiedReferenceDTO.java (added)
+++ felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/UnsatisfiedReferenceDTO.java Fri Jan  6 16:13:24 2017
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) OSGi Alliance (2013, 2014). All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.service.component.runtime.dto;
+
+import org.osgi.dto.DTO;
+import org.osgi.framework.dto.ServiceReferenceDTO;
+
+/**
+ * A representation of an unsatisfied reference.
+ * 
+ * @since 1.3
+ * @NotThreadSafe
+ * @author $Id$
+ */
+public class UnsatisfiedReferenceDTO extends DTO {
+	/**
+	 * The name of the declared reference.
+	 * 
+	 * <p>
+	 * This is declared in the {@code name} attribute of the {@code reference}
+	 * element of the component description.
+	 * 
+	 * @see ReferenceDTO#name
+	 */
+	public String					name;
+
+	/**
+	 * The target property of the unsatisfied reference.
+	 * 
+	 * <p>
+	 * This is the value of the {@link ComponentConfigurationDTO#properties
+	 * component property} whose name is the concatenation of the
+	 * {@link ReferenceDTO#name declared reference name} and
+	 * &quot;.target&quot;. This must be {@code null} if no target property is
+	 * set for the reference.
+	 */
+	public String					target;
+
+	/**
+	 * The target services.
+	 * 
+	 * <p>
+	 * Each {@link ServiceReferenceDTO} in the array represents a target service
+	 * for the reference. The array must be empty if there are no target
+	 * services. The upper bound on the number of target services in the array
+	 * is the upper bound on the {@link ReferenceDTO#cardinality cardinality} of
+	 * the reference.
+	 */
+	public ServiceReferenceDTO[]	targetServices;
+}

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/UnsatisfiedReferenceDTO.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/UnsatisfiedReferenceDTO.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Added: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/package-info.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/package-info.java?rev=1777635&view=auto
==============================================================================
--- felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/package-info.java (added)
+++ felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/package-info.java Fri Jan  6 16:13:24 2017
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) OSGi Alliance (2014, 2016). All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Service Component Runtime Data Transfer Objects Package Version 1.4.
+ * <p>
+ * Bundles wishing to use this package must list the package in the
+ * Import-Package header of the bundle's manifest. This package has two types of
+ * users: the consumers that use the API in this package and the providers that
+ * implement the API in this package.
+ * <p>
+ * Example import for consumers using the API in this package:
+ * <p>
+ * {@code  Import-Package: org.osgi.service.component.runtime.dto; version="[1.4,2.0)"}
+ * <p>
+ * Example import for providers implementing the API in this package:
+ * <p>
+ * {@code  Import-Package: org.osgi.service.component.runtime.dto; version="[1.4,1.5)"}
+ *
+ * @author $Id$
+ */
+
+@Version(COMPONENT_SPECIFICATION_VERSION)
+package org.osgi.service.component.runtime.dto;
+
+import static org.osgi.service.component.ComponentConstants.COMPONENT_SPECIFICATION_VERSION;
+
+import org.osgi.annotation.versioning.Version;
+

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/package-info.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Added: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/package-info.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/package-info.java?rev=1777635&view=auto
==============================================================================
--- felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/package-info.java (added)
+++ felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/package-info.java Fri Jan  6 16:13:24 2017
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) OSGi Alliance (2013, 2016). All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Service Component Runtime Package Version 1.4.
+ * <p>
+ * Bundles wishing to use this package must list the package in the
+ * Import-Package header of the bundle's manifest. This package has two types of
+ * users: the consumers that use the API in this package and the providers that
+ * implement the API in this package.
+ * <p>
+ * Example import for consumers using the API in this package:
+ * <p>
+ * {@code  Import-Package: org.osgi.service.component.runtime; version="[1.4,2.0)"}
+ * <p>
+ * Example import for providers implementing the API in this package:
+ * <p>
+ * {@code  Import-Package: org.osgi.service.component.runtime; version="[1.4,1.5)"}
+ *
+ * @author $Id$
+ */
+
+@Version(COMPONENT_SPECIFICATION_VERSION)
+package org.osgi.service.component.runtime;
+
+import static org.osgi.service.component.ComponentConstants.COMPONENT_SPECIFICATION_VERSION;
+
+import org.osgi.annotation.versioning.Version;
+

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/package-info.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url