Autostart factories
Service and Temporal Dependency contains configuration constants.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@742885 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/api/src/main/java/org/apache/felix/ipojo/api/PrimitiveComponentType.java b/ipojo/api/src/main/java/org/apache/felix/ipojo/api/PrimitiveComponentType.java
index 5626615..bc3f937 100644
--- a/ipojo/api/src/main/java/org/apache/felix/ipojo/api/PrimitiveComponentType.java
+++ b/ipojo/api/src/main/java/org/apache/felix/ipojo/api/PrimitiveComponentType.java
@@ -370,6 +370,7 @@
         meta.addElement(m_manipulation);
         try {
             m_factory = new ComponentFactory(m_context, clazz, meta);
+            m_factory.start();
         } catch (ConfigurationException e) {
             throw new IllegalStateException("An exception occurs during factory initialization : " + e.getMessage());
         }
diff --git a/ipojo/api/src/main/java/org/apache/felix/ipojo/api/Service.java b/ipojo/api/src/main/java/org/apache/felix/ipojo/api/Service.java
index f015735..b70057f 100644
--- a/ipojo/api/src/main/java/org/apache/felix/ipojo/api/Service.java
+++ b/ipojo/api/src/main/java/org/apache/felix/ipojo/api/Service.java
@@ -36,6 +36,26 @@
 public class Service {
     
     /**
+     * Creation strategy : singleton (default).
+     */
+    public static final int SINGLETON_STRATEGY = ProvidedService.SINGLETON_STRATEGY;
+    
+    /**
+     * Creation strategy : delegate on the static factory method.
+     */
+    public static final int STATIC_STRATEGY = ProvidedService.STATIC_STRATEGY;
+    
+    /**
+     * Creation strategy : one service object per instance.
+     */
+    public static final int INSTANCE_STRATEGY = ProvidedService.INSTANCE_STRATEGY;
+    
+    /**
+     * Creation strategy : one service object per bundle (OSGi service factory).
+     */
+    public static final int  SERVICE_STRATEGY = ProvidedService.SERVICE_STRATEGY;
+    
+    /**
      * The provided service specification. 
      */
     private List m_specifications; // null be default computed. 
diff --git a/ipojo/api/src/main/java/org/apache/felix/ipojo/api/TemporalDependency.java b/ipojo/api/src/main/java/org/apache/felix/ipojo/api/TemporalDependency.java
index 9344016..4f89295 100644
--- a/ipojo/api/src/main/java/org/apache/felix/ipojo/api/TemporalDependency.java
+++ b/ipojo/api/src/main/java/org/apache/felix/ipojo/api/TemporalDependency.java
@@ -26,6 +26,22 @@
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
 public class TemporalDependency {
+    
+    /**
+     * OnTimeout policy: nullable object.
+     */
+    public static final String NULLABLE = "nullable";
+    
+    /**
+     * OnTimeout policy: empty array or collection.
+     */
+    public static final String EMPTY = "empty";
+    
+    /**
+     * OnTimeout policy: inject null.
+     */
+    public static final String NULL = "null";
+
 
     /**
      * The required specification.
@@ -141,6 +157,16 @@
     }
     
     /**
+     * Sets the dependency timeout.
+     * @param time the dependency timeout in ms
+     * @return the current dependency object
+     */
+    public TemporalDependency setTimeout(long time) {
+        m_timeout = new Long(time).toString();
+        return this;
+    }
+    
+    /**
      * Sets the dependency ontimeout policy.
      * Supports null, nullable, empty, and default-implementation.
      * In this latter case, you must specify the qualified class name