ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1513422 [1/2] - in /ace/sandbox/bramk: cnf/localrepo/ cnf/localrepo/org.apache.ace.builder/ cnf/localrepo/osgi.cmpn/ org.apache.ace.agent.launcher/src/org/apache/ace/agent/launcher/ org.apache.ace.agent/ org.apache.ace.agent/.settings/ org...
Date Tue, 13 Aug 2013 10:22:02 GMT
Author: bramk
Date: Tue Aug 13 10:22:01 2013
New Revision: 1513422

URL: http://svn.apache.org/r1513422
Log:
[sandbox] Agent API draft wip

Added:
    ace/sandbox/bramk/cnf/localrepo/org.apache.ace.builder/
    ace/sandbox/bramk/cnf/localrepo/org.apache.ace.builder/org.apache.ace.builder-1.0.0.jar   (with props)
    ace/sandbox/bramk/cnf/localrepo/osgi.cmpn/osgi.cmpn-4.2.0.jar   (with props)
    ace/sandbox/bramk/org.apache.ace.agent/.settings/bndtools.core.prefs
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/AgentConstants.java
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/configuration/
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/configuration/ConfigurationHandler.java
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/configuration/impl/
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/configuration/impl/ConfigurationHandlerImpl.java
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/configuration/packageinfo
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/connection/
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/connection/ConnectionHandler.java
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/connection/impl/
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/connection/impl/ConnectionHandlerImpl.java
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/connection/packageinfo
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/discovery/
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/discovery/DiscoveryHandler.java
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/discovery/impl/
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/discovery/impl/DiscoveryHandlerImpl.java
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/discovery/packageinfo
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/identification/
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/identification/IdentificationHandler.java
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/identification/impl/
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/identification/impl/IdentificationHandlerImpl.java
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/identification/packageinfo
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/impl/Activator.java
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/impl/AgentContext.java
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/impl/AgentControlImpl.java
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/packageinfo
    ace/sandbox/bramk/org.apache.ace.agent/test/
    ace/sandbox/bramk/org.apache.ace.agent/test/org/
    ace/sandbox/bramk/org.apache.ace.agent/test/org/apache/
    ace/sandbox/bramk/org.apache.ace.agent/test/org/apache/ace/
    ace/sandbox/bramk/org.apache.ace.agent/test/org/apache/ace/agent/
    ace/sandbox/bramk/org.apache.ace.agent/test/org/apache/ace/agent/deployment/
    ace/sandbox/bramk/org.apache.ace.agent/test/org/apache/ace/agent/deployment/impl/
    ace/sandbox/bramk/org.apache.ace.agent/test/org/apache/ace/agent/deployment/impl/DeploymentHandlerTest.java
    ace/sandbox/bramk/org.apache.ace.agent/test/org/apache/ace/agent/download/
    ace/sandbox/bramk/org.apache.ace.agent/test/org/apache/ace/agent/download/impl/
    ace/sandbox/bramk/org.apache.ace.agent/test/org/apache/ace/agent/download/impl/DownloadHandlerTest.java
    ace/sandbox/bramk/org.apache.ace.agent/test/org/apache/ace/agent/impl/
    ace/sandbox/bramk/org.apache.ace.agent/test/org/apache/ace/agent/impl/CustomControllerTest.java
    ace/sandbox/bramk/org.apache.ace.agent/test/org/apache/ace/agent/testutil/
    ace/sandbox/bramk/org.apache.ace.agent/test/org/apache/ace/agent/testutil/BaseWebServerTest.java
    ace/sandbox/bramk/org.apache.ace.agent/test/org/apache/ace/agent/testutil/TestWebServer.java
Removed:
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/AgentConfiguration.java
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/deployment/DeploymentHandle.java
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/deployment/DownloadDeploymentHandle.java
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/deployment/StreamDeploymentHandle.java
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/deployment/impl/AbstractDeploymentHandle.java
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/deployment/impl/DownloadDeploymentHandleImpl.java
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/deployment/impl/StreamDeploymentHandleImpl.java
Modified:
    ace/sandbox/bramk/cnf/localrepo/index.xml
    ace/sandbox/bramk/org.apache.ace.agent.launcher/src/org/apache/ace/agent/launcher/Launcher.java
    ace/sandbox/bramk/org.apache.ace.agent/.classpath
    ace/sandbox/bramk/org.apache.ace.agent/bnd.bnd
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/AgentControl.java
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/deployment/DeploymentHandler.java
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/deployment/RetryAfterException.java
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/deployment/impl/DeploymentHandlerImpl.java
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/download/impl/DownloadHandlerImpl.java
    ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/impl/DefaultController.java

Modified: ace/sandbox/bramk/cnf/localrepo/index.xml
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/cnf/localrepo/index.xml?rev=1513422&r1=1513421&r2=1513422&view=diff
==============================================================================
--- ace/sandbox/bramk/cnf/localrepo/index.xml (original)
+++ ace/sandbox/bramk/cnf/localrepo/index.xml Tue Aug 13 10:22:01 2013
@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
-<repository increment='1376304509235' name='Local' xmlns='http://www.osgi.org/xmlns/repository/v1.0.0'>
+<repository increment='1376331025039' name='Local' xmlns='http://www.osgi.org/xmlns/repository/v1.0.0'>
   <resource>
     <capability namespace='osgi.identity'>
       <attribute name='osgi.identity' value='org.eclipse.jetty.util'/>
@@ -1130,6 +1130,40 @@
   </resource>
   <resource>
     <capability namespace='osgi.identity'>
+      <attribute name='osgi.identity' value='org.apache.ace.builder'/>
+      <attribute name='type' value='osgi.bundle'/>
+      <attribute name='version' type='Version' value='1.0.0'/>
+    </capability>
+    <capability namespace='osgi.content'>
+      <attribute name='osgi.content' value='51b193545cf16fc4810982aa2d0da3272be8647e2e539c43b5a827bdaa0d836e'/>
+      <attribute name='url' value='org.apache.ace.builder/org.apache.ace.builder-1.0.0.jar'/>
+      <attribute name='size' type='Long' value='15651'/>
+      <attribute name='mime' value='application/vnd.osgi.bundle'/>
+    </capability>
+    <capability namespace='osgi.wiring.bundle'>
+      <attribute name='osgi.wiring.bundle' value='org.apache.ace.builder'/>
+      <attribute name='bundle-version' type='Version' value='1.0.0'/>
+    </capability>
+    <capability namespace='osgi.wiring.host'>
+      <attribute name='osgi.wiring.host' value='org.apache.ace.builder'/>
+      <attribute name='bundle-version' type='Version' value='1.0.0'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.apache.ace.builder'/>
+      <attribute name='version' type='Version' value='1.0.0'/>
+      <attribute name='bundle-symbolic-name' value='org.apache.ace.builder'/>
+      <attribute name='bundle-version' type='Version' value='1.0.0'/>
+      <directive name='uses' value='org.testng.annotations'/>
+    </capability>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(osgi.wiring.package=org.testng)'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(osgi.wiring.package=org.testng.annotations)'/>
+    </requirement>
+  </resource>
+  <resource>
+    <capability namespace='osgi.identity'>
       <attribute name='osgi.identity' value='biz.aQute.bnd'/>
       <attribute name='type' value='osgi.bundle'/>
       <attribute name='version' type='Version' value='2.1.0.20130613-062523'/>
@@ -2491,6 +2525,407 @@
   </resource>
   <resource>
     <capability namespace='osgi.identity'>
+      <attribute name='osgi.identity' value='osgi.cmpn'/>
+      <attribute name='type' value='osgi.bundle'/>
+      <attribute name='version' type='Version' value='4.2.0.200908310645'/>
+    </capability>
+    <capability namespace='osgi.content'>
+      <attribute name='osgi.content' value='c1310c4186ccc17a0d7089d83f96dc940c4eccb98d5edfd58819393c29c31655'/>
+      <attribute name='url' value='osgi.cmpn/osgi.cmpn-4.2.0.jar'/>
+      <attribute name='size' type='Long' value='614152'/>
+      <attribute name='mime' value='application/vnd.osgi.bundle'/>
+    </capability>
+    <capability namespace='osgi.wiring.bundle'>
+      <attribute name='osgi.wiring.bundle' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+    </capability>
+    <capability namespace='osgi.wiring.host'>
+      <attribute name='osgi.wiring.host' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='info.dmtree'/>
+      <attribute name='version' type='Version' value='1.0.1'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='info.dmtree.spi'/>
+      <attribute name='version' type='Version' value='1.0.0'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+      <directive name='uses' value='info.dmtree'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='info.dmtree.registry'/>
+      <attribute name='version' type='Version' value='1.0.0'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+      <directive name='uses' value='org.osgi.framework,info.dmtree,info.dmtree.notification'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='info.dmtree.notification.spi'/>
+      <attribute name='version' type='Version' value='1.0.0'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+      <directive name='uses' value='info.dmtree.notification'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='info.dmtree.security'/>
+      <attribute name='version' type='Version' value='1.0.0'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+      <directive name='uses' value='info.dmtree'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='info.dmtree.notification'/>
+      <attribute name='version' type='Version' value='1.0.0'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+      <directive name='uses' value='info.dmtree'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.osgi.application'/>
+      <attribute name='version' type='Version' value='1.0.0'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+      <directive name='uses' value='org.osgi.framework'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.osgi.service.application'/>
+      <attribute name='version' type='Version' value='1.1.0'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+      <directive name='uses' value='org.osgi.framework'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.osgi.service.blueprint.container'/>
+      <attribute name='version' type='Version' value='1.0.0'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+      <directive name='uses' value='org.osgi.service.blueprint.reflect,org.osgi.framework'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.osgi.service.blueprint.reflect'/>
+      <attribute name='version' type='Version' value='1.0.0'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.osgi.service.cm'/>
+      <attribute name='version' type='Version' value='1.3.0'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+      <directive name='uses' value='org.osgi.framework'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.osgi.service.component'/>
+      <attribute name='version' type='Version' value='1.1.0'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+      <directive name='uses' value='org.osgi.framework'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.osgi.service.deploymentadmin.spi'/>
+      <attribute name='version' type='Version' value='1.0.1'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+      <directive name='uses' value='org.osgi.service.deploymentadmin,org.osgi.framework'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.osgi.service.deploymentadmin'/>
+      <attribute name='version' type='Version' value='1.1.0'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+      <directive name='uses' value='org.osgi.framework'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.osgi.service.device'/>
+      <attribute name='version' type='Version' value='1.1.0'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+      <directive name='uses' value='org.osgi.framework'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.osgi.service.event'/>
+      <attribute name='version' type='Version' value='1.2.0'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+      <directive name='uses' value='org.osgi.framework'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.osgi.service.http'/>
+      <attribute name='version' type='Version' value='1.2.1'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+      <directive name='uses' value='javax.servlet.http,javax.servlet'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.osgi.service.io'/>
+      <attribute name='version' type='Version' value='1.0.0'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+      <directive name='uses' value='javax.microedition.io'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.osgi.service.log'/>
+      <attribute name='version' type='Version' value='1.3.0'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+      <directive name='uses' value='org.osgi.framework'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.osgi.service.metatype'/>
+      <attribute name='version' type='Version' value='1.1.0'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+      <directive name='uses' value='org.osgi.framework'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.osgi.service.monitor'/>
+      <attribute name='version' type='Version' value='1.0.0'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.osgi.service.prefs'/>
+      <attribute name='version' type='Version' value='1.1.1'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.osgi.service.provisioning'/>
+      <attribute name='version' type='Version' value='1.2.0'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.osgi.service.upnp'/>
+      <attribute name='version' type='Version' value='1.1.0'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.osgi.service.useradmin'/>
+      <attribute name='version' type='Version' value='1.1.0'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+      <directive name='uses' value='org.osgi.framework'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.osgi.service.wireadmin'/>
+      <attribute name='version' type='Version' value='1.0.0'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+      <directive name='uses' value='org.osgi.framework'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.osgi.util.measurement'/>
+      <attribute name='version' type='Version' value='1.0.1'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.osgi.util.position'/>
+      <attribute name='version' type='Version' value='1.0.1'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+      <directive name='uses' value='org.osgi.util.measurement'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.osgi.util.cdma'/>
+      <attribute name='version' type='Version' value='1.0.0'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+      <directive name='uses' value='org.osgi.framework,org.osgi.service.condpermadmin'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.osgi.util.gsm'/>
+      <attribute name='version' type='Version' value='1.0.1'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+      <directive name='uses' value='org.osgi.framework,org.osgi.service.condpermadmin'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.osgi.util.mobile'/>
+      <attribute name='version' type='Version' value='1.0.0'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+      <directive name='uses' value='org.osgi.framework,org.osgi.service.condpermadmin'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.osgi.util.tracker'/>
+      <attribute name='version' type='Version' value='1.4.0'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+      <directive name='uses' value='org.osgi.framework'/>
+    </capability>
+    <capability namespace='osgi.wiring.package'>
+      <attribute name='osgi.wiring.package' value='org.osgi.util.xml'/>
+      <attribute name='version' type='Version' value='1.0.1'/>
+      <attribute name='bundle-symbolic-name' value='osgi.cmpn'/>
+      <attribute name='bundle-version' type='Version' value='4.2.0.200908310645'/>
+      <directive name='uses' value='javax.xml.parsers,org.osgi.framework'/>
+    </capability>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=info.dmtree)(version&gt;=1.0.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=info.dmtree.notification)(version&gt;=1.0.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=info.dmtree.notification.spi)(version&gt;=1.0.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=info.dmtree.registry)(version&gt;=1.0.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=info.dmtree.security)(version&gt;=1.0.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=info.dmtree.spi)(version&gt;=1.0.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(osgi.wiring.package=javax.microedition.io)'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(osgi.wiring.package=javax.servlet)'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(osgi.wiring.package=javax.servlet.http)'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(osgi.wiring.package=javax.xml.parsers)'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.application)(version&gt;=1.0.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.framework)(version&gt;=1.5.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.service.application)(version&gt;=1.1.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.service.blueprint.container)(version&gt;=1.0.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.service.blueprint.reflect)(version&gt;=1.0.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.service.cm)(version&gt;=1.3.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.service.component)(version&gt;=1.1.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.service.condpermadmin)(version&gt;=1.1.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.service.deploymentadmin)(version&gt;=1.1.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.service.deploymentadmin.spi)(version&gt;=1.0.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.service.device)(version&gt;=1.1.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.service.event)(version&gt;=1.2.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.service.http)(version&gt;=1.2.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.service.io)(version&gt;=1.0.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.service.log)(version&gt;=1.3.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.service.metatype)(version&gt;=1.1.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.service.monitor)(version&gt;=1.0.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.service.prefs)(version&gt;=1.1.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.service.provisioning)(version&gt;=1.2.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.service.upnp)(version&gt;=1.1.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.service.useradmin)(version&gt;=1.1.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.service.wireadmin)(version&gt;=1.0.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.util.cdma)(version&gt;=1.0.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.util.gsm)(version&gt;=1.0.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.util.measurement)(version&gt;=1.0.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.util.mobile)(version&gt;=1.0.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.util.position)(version&gt;=1.0.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.util.tracker)(version&gt;=1.4.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+    <requirement namespace='osgi.wiring.package'>
+      <directive name='filter' value='(&amp;(osgi.wiring.package=org.osgi.util.xml)(version&gt;=1.0.0)(!(version&gt;=2.0.0)))'/>
+      <directive name='resolution' value='optional'/>
+    </requirement>
+  </resource>
+  <resource>
+    <capability namespace='osgi.identity'>
       <attribute name='osgi.identity' value='org.eclipse.jetty.io'/>
       <attribute name='type' value='osgi.bundle'/>
       <attribute name='version' type='Version' value='7.6.9.v20130131'/>

Added: ace/sandbox/bramk/cnf/localrepo/org.apache.ace.builder/org.apache.ace.builder-1.0.0.jar
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/cnf/localrepo/org.apache.ace.builder/org.apache.ace.builder-1.0.0.jar?rev=1513422&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ace/sandbox/bramk/cnf/localrepo/org.apache.ace.builder/org.apache.ace.builder-1.0.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ace/sandbox/bramk/cnf/localrepo/osgi.cmpn/osgi.cmpn-4.2.0.jar
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/cnf/localrepo/osgi.cmpn/osgi.cmpn-4.2.0.jar?rev=1513422&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ace/sandbox/bramk/cnf/localrepo/osgi.cmpn/osgi.cmpn-4.2.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: ace/sandbox/bramk/org.apache.ace.agent.launcher/src/org/apache/ace/agent/launcher/Launcher.java
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.agent.launcher/src/org/apache/ace/agent/launcher/Launcher.java?rev=1513422&r1=1513421&r2=1513422&view=diff
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.agent.launcher/src/org/apache/ace/agent/launcher/Launcher.java (original)
+++ ace/sandbox/bramk/org.apache.ace.agent.launcher/src/org/apache/ace/agent/launcher/Launcher.java Tue Aug 13 10:22:01 2013
@@ -19,9 +19,9 @@
 
 package org.apache.ace.agent.launcher;
 
-import static org.apache.ace.agent.Constants.CONFIG_IDENTIFICATION_KEY;
-import static org.apache.ace.agent.Constants.CONFIG_LOGLEVEL_KEY;
-import static org.apache.ace.agent.Constants.CONFIG_SERVERURL_KEY;
+import static org.apache.ace.agent.AgentConstants.CONFIG_IDENTIFICATION_KEY;
+import static org.apache.ace.agent.AgentConstants.CONFIG_LOGLEVEL_KEY;
+import static org.apache.ace.agent.AgentConstants.CONFIG_SERVERURL_KEY;
 
 import java.io.BufferedReader;
 import java.io.File;

Modified: ace/sandbox/bramk/org.apache.ace.agent/.classpath
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.agent/.classpath?rev=1513422&r1=1513421&r2=1513422&view=diff
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.agent/.classpath (original)
+++ ace/sandbox/bramk/org.apache.ace.agent/.classpath Tue Aug 13 10:22:01 2013
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="src" path="test"/>
+	<classpathentry kind="src" output="bin_test" path="test"/>
 	<classpathentry kind="con" path="aQute.bnd.classpath.container"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="con" path="org.testng.TESTNG_CONTAINER"/>

Added: ace/sandbox/bramk/org.apache.ace.agent/.settings/bndtools.core.prefs
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.agent/.settings/bndtools.core.prefs?rev=1513422&view=auto
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.agent/.settings/bndtools.core.prefs (added)
+++ ace/sandbox/bramk/org.apache.ace.agent/.settings/bndtools.core.prefs Tue Aug 13 10:22:01 2013
@@ -0,0 +1,3 @@
+compileErrorAction=skip
+eclipse.preferences.version=1
+eclipseClasspath=hide

Modified: ace/sandbox/bramk/org.apache.ace.agent/bnd.bnd
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.agent/bnd.bnd?rev=1513422&r1=1513421&r2=1513422&view=diff
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.agent/bnd.bnd (original)
+++ ace/sandbox/bramk/org.apache.ace.agent/bnd.bnd Tue Aug 13 10:22:01 2013
@@ -1,9 +1,45 @@
 Bundle-Name: Apache ACE Agent
 Bundle-Description: Implementation of the Apache ACE Agent
 Bundle-Version: 1.0.0
+Bundle-Activator: org.apache.ace.agent.impl.Activator
 
--buildpath: osgi.core,\
-	javax.servlet;version=2.5.0,\
+Private-Package: org.apache.ace.agent.connection.impl,\
+	org.apache.ace.agent.configuration.impl,\
+	org.apache.ace.agent.identification.impl,\
+	org.apache.ace.agent.discovery.impl,\
+	org.apache.ace.agent.deployment.impl,\
+	org.apache.ace.agent.download.impl,\
+	org.apache.ace.agent.impl,\
+	org.apache.felix.deploymentadmin,\
+	org.apache.felix.deploymentadmin.spi,\
+	org.apache.felix.dm.impl.dependencies,\
+	org.apache.felix.dm,\
+	org.apache.felix.dm.impl,\
+	org.apache.felix.dm.impl.index,\
+	org.apache.felix.dm.impl.metatype,\
+	org.apache.felix.dm.tracker,\
+	org.osgi.util.tracker
+
+Import-Package: \
+    !org.osgi.service.cm,\
+	!org.osgi.service.metatype,\
+	org.osgi.service.event;resolution:=optional,\
+	org.osgi.service.log;resolution:=optional,\
+	*
+	
+Export-Package: org.apache.ace.agent,\
+	org.apache.ace.agent.download,\
+	org.apache.ace.agent.deployment,\
+	org.osgi.service.deploymentadmin;-split-package:=merge-last,\
+	org.osgi.service.deploymentadmin.spi;-split-package:=merge-last,\
+	org.apache.ace.agent.discovery,\
+	org.apache.ace.agent.identification,\
+	org.apache.ace.agent.connection,\
+	org.apache.ace.agent.configuration
+
+-buildpath: osgi.core;version=4.2,\
+	osgi.cmpn;version=4.2,\
+	javax.servlet;version=2.5,\
 	org.eclipse.jetty.http;version=7.6.9,\
 	org.eclipse.jetty.io;version=7.6.9,\
 	org.eclipse.jetty.jmx;version=7.6.9,\
@@ -12,19 +48,13 @@ Bundle-Version: 1.0.0
 	org.eclipse.jetty.servlet;version=7.6.9,\
 	org.eclipse.jetty.util;version=7.6.9,\
 	org.eclipse.jetty.continuation;version=7.6.9.v20130131,\
-	org.apache.felix.deploymentadmin;version=0.9.4
+	org.apache.felix.deploymentadmin;version=0.9.4,\
+	org.easymock,\
+	org.apache.felix.dependencymanager
 
 -sources false
-
-#
-#	
-Private-Package: org.apache.ace.agent.deployment.impl,\
-	org.apache.ace.agent.impl,\
-	org.apache.ace.agent.download
-
-# 
-#
-Import-Package: *
-Export-Package: org.apache.ace.agent,\
-	org.apache.ace.agent.download,\
-	org.apache.ace.agent.deployment
\ No newline at end of file
+-runfw: org.apache.felix.framework;version='[4.0.3,4.0.3]'
+-runee: JavaSE-1.6
+-runbundles: org.apache.felix.gogo.command,\
+	org.apache.felix.gogo.runtime,\
+	org.apache.felix.gogo.shell
\ No newline at end of file

Added: ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/AgentConstants.java
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/AgentConstants.java?rev=1513422&view=auto
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/AgentConstants.java (added)
+++ ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/AgentConstants.java Tue Aug 13 10:22:01 2013
@@ -0,0 +1,6 @@
+package org.apache.ace.agent;
+
+public interface AgentConstants {
+
+    String HEADER_DPSIZE = "X-ACE-DPSize";
+}

Modified: ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/AgentControl.java
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/AgentControl.java?rev=1513422&r1=1513421&r2=1513422&view=diff
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/AgentControl.java (original)
+++ ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/AgentControl.java Tue Aug 13 10:22:01 2013
@@ -1,12 +1,10 @@
 package org.apache.ace.agent;
 
-import java.io.IOException;
 import java.util.List;
 
+import org.apache.ace.agent.configuration.ConfigurationHandler;
 import org.apache.ace.agent.deployment.DeploymentHandler;
-import org.apache.ace.agent.deployment.RetryAfterException;
 import org.apache.ace.agent.download.DownloadHandler;
-import org.osgi.framework.Version;
 
 /**
  * The agent's control (service) interface. Provides control functions and access to configuration for consumers that
@@ -15,7 +13,7 @@ import org.osgi.framework.Version;
 public interface AgentControl {
 
     /** access to the configuration */
-    AgentConfiguration getConfiguration();
+    ConfigurationHandler getConfiguration();
 
     /** access to the feedback channels */
     List<FeedbackChannel> getFeedbackChannels();
@@ -23,12 +21,6 @@ public interface AgentControl {
     /** access to the a named feedback channel */
     FeedbackChannel getFeedbackChannel(String name);
 
-    /** current deployment version */
-    Version getCurrentVersion();
-
-    /** available deployment versions */
-    Version[] getAvailableVersions() throws RetryAfterException, IOException;
-
     DownloadHandler getDownloadHandler();
 
     DeploymentHandler getDeploymentHandler();

Added: ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/configuration/ConfigurationHandler.java
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/configuration/ConfigurationHandler.java?rev=1513422&view=auto
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/configuration/ConfigurationHandler.java (added)
+++ ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/configuration/ConfigurationHandler.java Tue Aug 13 10:22:01 2013
@@ -0,0 +1,101 @@
+package org.apache.ace.agent.configuration;
+
+import java.util.Map;
+import java.util.logging.Level;
+
+/**
+ * The agent's persisted configuration. External launchers can override the default values through system properties
+ * when the agent starts. However, once a configuration value has been stored in the persisted configuration is will no
+ * longer be overwritten by system properties. This ensures a simple system restart will not override configuration set
+ * by runtime controllers.
+ */
+// TODO should we support recovery by allow config overrides through system properties or should a luancher just wip
+// the bundle cache when it requires a clean boostrap?
+public interface ConfigurationHandler {
+
+    // NOTE Configuration of the default subsystems for identification, discovery and connection handling is not part of
+    // this definition. Even though they are default implementations the are still extensions.
+
+    /**
+     * Sync interval; When sync is active it will automatically install updates and send feedback to the server. The
+     * time unit is seconds. A value of 0 or less disables the sync.
+     */
+    String CONFIG_KEY_SYNC_INTERVAL = ConfigurationHandler.class.getPackage().getName() + ".syncinterval";
+    long CONFIG_DEFAULT_SYNC_INTERVAL = 300l;
+
+    void setSyncInterval(long seconds);
+
+    long getSyncInterval();
+
+    /**
+     * SyncRetries value; When an install fails during a sync the agent can try to recover by ignoring optimization
+     * flags and potentially restarting a Deployment Package download. A value of 1 or less disables the retry behavior.
+     */
+    String CONFIG_KEY_SYNC_RETRIES = ConfigurationHandler.class.getPackage().getName() + ".syncretries";
+    int CONFIG_DEFAULT_SYNC_RETRIES = 3;
+
+    void setSyncRetries(int value);
+
+    int getSyncRetries();
+
+    /**
+     * UpdateStreaming flag; When set Deployment Packages are installed directly from the download stream reducing
+     * overhead and disk usage, but disabling resume capabilities. This strategy is of interest to highly resource
+     * constraint devices and/or system with highly reliable connectivity and no need for resume semantics.
+     */
+    String CONFIG_KEY_STREAMING_UPDATES = ConfigurationHandler.class.getPackage().getName() + ".updatestreaming";
+    boolean CONFIG_DEFAULT_UPDATE_STREAMING = false;
+
+    void setUpdateStreaming(boolean flag);
+
+    boolean getUpdateStreaming();
+
+    /**
+     * StopUnaffected flag; When set all target bundles of a Deployment Package will be restarted as part of the
+     * deployment session. Otherwise the agent tries to minimize the impact by only restarting bundles that are actually
+     * affected. Not stopping unaffected bundles reduces overhead, but may fail in complex wiring scenarios.
+     */
+    String CONFIG_KEY_STOP_UNAFFECTED = ConfigurationHandler.class.getPackage().getName() + ".stopunaffected";
+    boolean CONFIG_DEFAULT_STOP_UNAFFECTED = true; // spec behavior
+
+    void setStopUnaffected(boolean flag);
+
+    boolean getStopUnaffected();
+
+    /**
+     * FixPackages flag; When set the Agent will request the server for fix packages instead of full deployment
+     * packages. This behavior significantly reduces bandwidth consumption.
+     */
+    String CONFIG_KEY_FIX_PACKAGES = ConfigurationHandler.class.getPackage().getName() + ".fixpackages";
+    boolean CONFIG_DEFAULT_FIX_PACKAGES = true;
+
+    void setFixPackage(boolean flag);
+
+    boolean getFixPackages();
+
+    /**
+     * Log level; Logging uses standard Java logging to guarantee optimal compatibility in any standard Java
+     * environment.
+     */
+    String CONFIG_KEY_LOG_LEVEL = ConfigurationHandler.class.getPackage().getName() + ".loglevel";
+    Level CONFIG_DEFAULT_LOG_LEVEL = Level.INFO;
+
+    void setLogLevel(Level level);
+
+    Level getLogLevel();
+
+    /**
+     * Custom configuration keys; This is provided to allow a launcher to specify system properties that should be
+     * included in the persistent configuration map. The initial values of these properties are only read once when the
+     * agent starts and only stored if no value is set in the configuration map.
+     */
+    String CONFIG_KEY_EXTENSION_PROPERTIES = ConfigurationHandler.class.getPackage().getName() + ".extensionkeys";
+
+    /**
+     * Direct access to the configuration map; This is provided to allow extensions to access custom configuration
+     * properties.
+     */
+    void setMap(Map<String, String> configuration);
+
+    Map<String, String> getMap();
+}

Added: ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/configuration/impl/ConfigurationHandlerImpl.java
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/configuration/impl/ConfigurationHandlerImpl.java?rev=1513422&view=auto
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/configuration/impl/ConfigurationHandlerImpl.java (added)
+++ ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/configuration/impl/ConfigurationHandlerImpl.java Tue Aug 13 10:22:01 2013
@@ -0,0 +1,80 @@
+package org.apache.ace.agent.configuration.impl;
+
+import java.util.Map;
+import java.util.logging.Level;
+
+import org.apache.ace.agent.configuration.ConfigurationHandler;
+import org.apache.ace.agent.impl.AgentContext;
+
+public class ConfigurationHandlerImpl implements ConfigurationHandler {
+
+    private final AgentContext m_agentContext;
+
+    public ConfigurationHandlerImpl(AgentContext agentContext) {
+        m_agentContext = agentContext;
+    }
+
+    @Override
+    public void setSyncInterval(long seconds) {
+    }
+
+    @Override
+    public long getSyncInterval() {
+        return 10;
+    }
+
+    @Override
+    public void setSyncRetries(int value) {
+    }
+
+    @Override
+    public int getSyncRetries() {
+        return 3;
+    }
+
+    @Override
+    public void setUpdateStreaming(boolean flag) {
+    }
+
+    @Override
+    public boolean getUpdateStreaming() {
+        return false;
+    }
+
+    @Override
+    public void setStopUnaffected(boolean flag) {
+    }
+
+    @Override
+    public boolean getStopUnaffected() {
+        return false;
+    }
+
+    @Override
+    public void setFixPackage(boolean flag) {
+    }
+
+    @Override
+    public boolean getFixPackages() {
+        return false;
+    }
+
+    @Override
+    public void setLogLevel(Level level) {
+    }
+
+    @Override
+    public Level getLogLevel() {
+        return null;
+    }
+
+    @Override
+    public void setMap(Map<String, String> configuration) {
+    }
+
+    @Override
+    public Map<String, String> getMap() {
+        return null;
+    }
+
+}

Added: ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/configuration/packageinfo
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/configuration/packageinfo?rev=1513422&view=auto
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/configuration/packageinfo (added)
+++ ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/configuration/packageinfo Tue Aug 13 10:22:01 2013
@@ -0,0 +1 @@
+version 1.0
\ No newline at end of file

Added: ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/connection/ConnectionHandler.java
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/connection/ConnectionHandler.java?rev=1513422&view=auto
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/connection/ConnectionHandler.java (added)
+++ ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/connection/ConnectionHandler.java Tue Aug 13 10:22:01 2013
@@ -0,0 +1,10 @@
+package org.apache.ace.agent.connection;
+
+import java.io.IOException;
+import java.net.URL;
+import java.net.URLConnection;
+
+public interface ConnectionHandler {
+
+    URLConnection getConnection(URL url) throws IOException;
+}

Added: ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/connection/impl/ConnectionHandlerImpl.java
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/connection/impl/ConnectionHandlerImpl.java?rev=1513422&view=auto
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/connection/impl/ConnectionHandlerImpl.java (added)
+++ ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/connection/impl/ConnectionHandlerImpl.java Tue Aug 13 10:22:01 2013
@@ -0,0 +1,22 @@
+package org.apache.ace.agent.connection.impl;
+
+import java.io.IOException;
+import java.net.URL;
+import java.net.URLConnection;
+
+import org.apache.ace.agent.connection.ConnectionHandler;
+import org.apache.ace.agent.impl.AgentContext;
+
+public class ConnectionHandlerImpl implements ConnectionHandler {
+
+    private final AgentContext m_agentContext;
+
+    public ConnectionHandlerImpl(AgentContext agentContext) {
+        m_agentContext = agentContext;
+    }
+
+    @Override
+    public URLConnection getConnection(URL url) throws IOException {
+        return url.openConnection();
+    }
+}

Added: ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/connection/packageinfo
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/connection/packageinfo?rev=1513422&view=auto
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/connection/packageinfo (added)
+++ ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/connection/packageinfo Tue Aug 13 10:22:01 2013
@@ -0,0 +1 @@
+version 1.0
\ No newline at end of file

Modified: ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/deployment/DeploymentHandler.java
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/deployment/DeploymentHandler.java?rev=1513422&r1=1513421&r2=1513422&view=diff
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/deployment/DeploymentHandler.java (original)
+++ ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/deployment/DeploymentHandler.java Tue Aug 13 10:22:01 2013
@@ -1,5 +1,10 @@
 package org.apache.ace.agent.deployment;
 
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.SortedSet;
+
 import org.osgi.framework.Version;
 
 /**
@@ -8,21 +13,17 @@ import org.osgi.framework.Version;
  */
 public interface DeploymentHandler {
 
-    /**
-     * Get a deployment handle that support streaming install.
-     * 
-     * @param version The deployment version
-     * @param fixPackage Whether to use a fix-package
-     * @return The handle
-     */
-    StreamDeploymentHandle getStreamHandle(Version version, boolean fixPackage);
-
-    /**
-     * Get a deployment handle that support download install.
-     * 
-     * @param version The deployment version
-     * @param fixPackage Whether to use a fix-package
-     * @return The handle
-     */
-    DownloadDeploymentHandle getDownloadHandle(Version version, boolean fixPackage);
+    SortedSet<Version> getInstalledVersions() throws RetryAfterException, IOException;
+
+    SortedSet<Version> getAvailableVersions() throws RetryAfterException, IOException;
+
+    URL getPackageURL(Version version, boolean fixPackage) throws RetryAfterException, IOException;
+
+    long getPackageSize(Version version, boolean fixPackage) throws RetryAfterException, IOException;
+
+    void deployPackage(Version version, boolean fixPackage) throws RetryAfterException, IOException;
+
+    void deployPackage(InputStream inputStream) throws RetryAfterException, IOException;
+
+    void deployPackage(URL url) throws RetryAfterException, IOException;
 }

Modified: ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/deployment/RetryAfterException.java
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/deployment/RetryAfterException.java?rev=1513422&r1=1513421&r2=1513422&view=diff
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/deployment/RetryAfterException.java (original)
+++ ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/deployment/RetryAfterException.java Tue Aug 13 10:22:01 2013
@@ -3,8 +3,14 @@ package org.apache.ace.agent.deployment;
 public class RetryAfterException extends Exception {
 
     private static final long serialVersionUID = 1L;
+    private final int m_seconds;
 
-    public RetryAfterException(int time) {
-        super("Server too busy. Retry after " + time + " seconds");
+    public RetryAfterException(int seconds) {
+        super("Server too busy. Retry after " + seconds + " seconds");
+        m_seconds = seconds;
+    }
+    
+    public int getSeconds(){
+        return m_seconds;
     }
 }

Modified: ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/deployment/impl/DeploymentHandlerImpl.java
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/deployment/impl/DeploymentHandlerImpl.java?rev=1513422&r1=1513421&r2=1513422&view=diff
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/deployment/impl/DeploymentHandlerImpl.java (original)
+++ ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/deployment/impl/DeploymentHandlerImpl.java Tue Aug 13 10:22:01 2013
@@ -1,51 +1,203 @@
 package org.apache.ace.agent.deployment.impl;
 
+import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
 import java.net.URL;
+import java.net.URLConnection;
+import java.util.SortedSet;
+import java.util.TreeSet;
 
+import org.apache.ace.agent.AgentConstants;
 import org.apache.ace.agent.deployment.DeploymentHandler;
-import org.apache.ace.agent.deployment.DownloadDeploymentHandle;
-import org.apache.ace.agent.deployment.StreamDeploymentHandle;
-import org.apache.ace.agent.download.DownloadHandle;
-import org.apache.ace.agent.download.DownloadHandler;
+import org.apache.ace.agent.deployment.RetryAfterException;
+import org.apache.ace.agent.impl.AgentContext;
+import org.apache.felix.deploymentadmin.DeploymentAdminImpl;
 import org.osgi.framework.Version;
 import org.osgi.service.deploymentadmin.DeploymentAdmin;
 import org.osgi.service.deploymentadmin.DeploymentException;
+import org.osgi.service.deploymentadmin.DeploymentPackage;
 
 public class DeploymentHandlerImpl implements DeploymentHandler {
 
+    private final AgentContext m_agentContext;
     private DeploymentAdmin m_deploymentAdmin;
-    private DownloadHandler m_downloadHandler;
 
-    public DeploymentHandlerImpl(DeploymentAdmin deploymentAdmin, DownloadHandler downloadHandler) {
+    public DeploymentHandlerImpl(AgentContext agentContext) {
+        this(agentContext, new DeploymentAdminImpl());
+    }
+
+    public DeploymentHandlerImpl(AgentContext agentContext, DeploymentAdmin deploymentAdmin) {
+        m_agentContext = agentContext;
         m_deploymentAdmin = deploymentAdmin;
-        m_downloadHandler = downloadHandler;
     }
 
     @Override
-    public StreamDeploymentHandle getStreamHandle(Version version, boolean fixPackage) {
-        return new StreamDeploymentHandleImpl(this, getDeploymentUrl(version, fixPackage));
+    public SortedSet<Version> getInstalledVersions() throws RetryAfterException, IOException {
+        return listInstalledVersions();
+    }
+
+    @Override
+    public SortedSet<Version> getAvailableVersions() throws RetryAfterException, IOException {
+        return listRemoteVersions();
+    }
+
+    @Override
+    public URL getPackageURL(Version version, boolean fixPackage) throws RetryAfterException, IOException {
+        URL url = null;
+        if (fixPackage) {
+            url = getEndpoint(getServerURL(), getIdentification(),
+                getInstalledVersions().last(), version);
+        }
+        else {
+            url = getEndpoint(getServerURL(), getIdentification(), version);
+        }
+        return url;
+    }
+
+    @Override
+    public long getPackageSize(Version version, boolean fixPackage) throws RetryAfterException, IOException {
+
+        URL url = getPackageURL(version, fixPackage);
+        long packageSize = -1l;
+
+        URLConnection urlConnection = null;
+        InputStream inputStream = null;
+        try {
+            urlConnection = url.openConnection();
+            if (urlConnection instanceof HttpURLConnection)
+                ((HttpURLConnection) urlConnection).setRequestMethod("HEAD");
+
+            String dpSizeHeader = urlConnection.getHeaderField(AgentConstants.HEADER_DPSIZE);
+            if (dpSizeHeader != null)
+                try {
+                    packageSize = Long.parseLong(dpSizeHeader);
+                }
+                catch (NumberFormatException e) {
+                    // ignore
+                }
+            return packageSize;
+        }
+        finally {
+            if (urlConnection != null && urlConnection instanceof HttpURLConnection)
+                ((HttpURLConnection) urlConnection).disconnect();
+            if (inputStream != null)
+                try {
+                    inputStream.close();
+                }
+                catch (IOException e) {
+                    // ignore
+                }
+        }
     }
 
     @Override
-    public DownloadDeploymentHandle getDownloadHandle(Version version, boolean fixPackage) {
-        URL url = getDeploymentUrl(version, fixPackage);
-        DownloadHandle handle = m_downloadHandler.getHandle(url);
-        return new DownloadDeploymentHandleImpl(this, url, handle);
+    public void deployPackage(Version version, boolean fixPackage) throws RetryAfterException, IOException {
+        URL url = getPackageURL(version, fixPackage);
+        deployPackage(url);
+    }
+
+    @Override
+    public void deployPackage(URL url) {
+        // FIXME exceptions
+        URLConnection urlConnection = null;
+        InputStream inputStream = null;
+        try {
+            urlConnection = url.openConnection();
+            inputStream = urlConnection.getInputStream();
+            deployPackage(inputStream);
+        }
+        catch (Exception e) {
+            e.printStackTrace();
+        }
+        finally {
+            if (urlConnection != null && urlConnection instanceof HttpURLConnection)
+                ((HttpURLConnection) urlConnection).disconnect();
+            if (inputStream != null)
+                try {
+                    inputStream.close();
+                }
+                catch (IOException e) {
+                    e.printStackTrace();
+                }
+        }
     }
 
-    void install(InputStream inputStream) throws IOException {
-        // FIXME exception
+    @Override
+    public void deployPackage(InputStream inputStream) {
+        // FIXME exceptions
         try {
             m_deploymentAdmin.installDeploymentPackage(inputStream);
         }
         catch (DeploymentException e) {
-            throw new IOException(e);
+            e.printStackTrace();
+        }
+    }
+
+    private SortedSet<Version> listRemoteVersions() throws IOException {
+
+        SortedSet<Version> versions = new TreeSet<Version>();
+        URL endpoint = getEndpoint(getServerURL(), getIdentification());
+        URLConnection connection = null;
+        BufferedReader reader = null;
+
+        try {
+            connection = m_agentContext.getConnectionHandler().getConnection(endpoint);
+            reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
+            String versionString;
+            while ((versionString = reader.readLine()) != null) {
+                try {
+                    Version version = Version.parseVersion(versionString);
+                    if (version != Version.emptyVersion) {
+                        versions.add(version);
+                    }
+                }
+                catch (IllegalArgumentException e) {
+                    throw new IOException(e);
+                }
+            }
+            return versions;
+        }
+        finally {
+            if (connection != null && connection instanceof HttpURLConnection)
+                ((HttpURLConnection) connection).disconnect();
+            if (reader != null)
+                reader.close();
         }
     }
 
-    protected URL getDeploymentUrl(Version version, boolean fixPackage) {
-        return null;
+    private SortedSet<Version> listInstalledVersions() {
+        DeploymentPackage[] installedPackages = m_deploymentAdmin.listDeploymentPackages();
+        SortedSet<Version> versions = new TreeSet<Version>();
+        versions.add(Version.emptyVersion);
+        for (int i = 0; i < installedPackages.length; i++) {
+            if (installedPackages[i].getName().equals(getIdentification())) {
+                versions.add(installedPackages[i].getVersion());
+            }
+        }
+        return versions;
+    }
+
+    private String getIdentification() {
+        return m_agentContext.getIdentificationHandler().getIdentification();
+    }
+
+    private URL getServerURL() {
+        return m_agentContext.getDiscoveryHandler().getServerUrls()[0];
+    }
+
+    private static URL getEndpoint(URL serverURL, String identification) throws MalformedURLException {
+        return new URL(serverURL, "deployment/" + identification + "/versions/");
+    }
+
+    private URL getEndpoint(URL serverURL, String identification, Version version) throws MalformedURLException {
+        return new URL(serverURL, "deployment/" + identification + "/versions/" + version.toString());
+    }
+
+    private URL getEndpoint(URL serverURL, String identification, Version from, Version to) throws MalformedURLException {
+        return new URL(serverURL, "deployment/" + identification + "/versions/" + to.toString() + "?current=" + from);
     }
 }

Added: ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/discovery/DiscoveryHandler.java
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/discovery/DiscoveryHandler.java?rev=1513422&view=auto
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/discovery/DiscoveryHandler.java (added)
+++ ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/discovery/DiscoveryHandler.java Tue Aug 13 10:22:01 2013
@@ -0,0 +1,8 @@
+package org.apache.ace.agent.discovery;
+
+import java.net.URL;
+
+public interface DiscoveryHandler {
+
+    URL[] getServerUrls();
+}

Added: ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/discovery/impl/DiscoveryHandlerImpl.java
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/discovery/impl/DiscoveryHandlerImpl.java?rev=1513422&view=auto
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/discovery/impl/DiscoveryHandlerImpl.java (added)
+++ ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/discovery/impl/DiscoveryHandlerImpl.java Tue Aug 13 10:22:01 2013
@@ -0,0 +1,23 @@
+package org.apache.ace.agent.discovery.impl;
+
+import java.net.URL;
+
+import org.apache.ace.agent.discovery.DiscoveryHandler;
+import org.apache.ace.agent.impl.AgentContext;
+
+public class DiscoveryHandlerImpl implements DiscoveryHandler {
+
+    private final AgentContext m_agentContext;
+
+    private URL[] m_urls;
+
+    public DiscoveryHandlerImpl(AgentContext agentContext) throws Exception {
+        m_agentContext = agentContext;
+        m_urls = new URL[] { new URL("http://localhost:8888") };
+    }
+
+    @Override
+    public URL[] getServerUrls() {
+        return m_urls;
+    }
+}

Added: ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/discovery/packageinfo
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/discovery/packageinfo?rev=1513422&view=auto
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/discovery/packageinfo (added)
+++ ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/discovery/packageinfo Tue Aug 13 10:22:01 2013
@@ -0,0 +1 @@
+version 1.0
\ No newline at end of file

Modified: ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/download/impl/DownloadHandlerImpl.java
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/download/impl/DownloadHandlerImpl.java?rev=1513422&r1=1513421&r2=1513422&view=diff
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/download/impl/DownloadHandlerImpl.java (original)
+++ ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/download/impl/DownloadHandlerImpl.java Tue Aug 13 10:22:01 2013
@@ -2,15 +2,18 @@ package org.apache.ace.agent.download.im
 
 import java.net.URL;
 import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ThreadFactory;
 
 import org.apache.ace.agent.download.DownloadHandle;
 import org.apache.ace.agent.download.DownloadHandler;
+import org.apache.ace.agent.impl.AgentContext;
 
 public class DownloadHandlerImpl implements DownloadHandler {
 
-    private ExecutorService m_exe;
+    private final AgentContext m_agentContext;
+
+    public DownloadHandlerImpl(AgentContext agentContext) {
+        m_agentContext = agentContext;
+    }
 
     @Override
     public DownloadHandle getHandle(URL url) {
@@ -22,29 +25,11 @@ public class DownloadHandlerImpl impleme
         return new DownloadHandleImpl(this, url, readBufferSize);
     }
 
-    public void start() throws Exception {
-        m_exe = Executors.newCachedThreadPool(new ThreadFactory() {
-            private volatile int m_count;
-
-            @Override
-            public Thread newThread(Runnable r) {
-                Thread t = new Thread(r, "DownloadHandler Thread (" + m_count++ + ")");
-                t.setDaemon(true);
-                return t;
-            }
-        });
-
-    }
-
-    public void stop() throws Exception {
-        m_exe.shutdownNow();
-    }
-
     /*
      * handle support methods
      */
     ExecutorService getExecutor() {
-        return m_exe;
+        return m_agentContext.getExecutorService();
     }
 
     void logDebug(String message, Object... args) {

Added: ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/identification/IdentificationHandler.java
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/identification/IdentificationHandler.java?rev=1513422&view=auto
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/identification/IdentificationHandler.java (added)
+++ ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/identification/IdentificationHandler.java Tue Aug 13 10:22:01 2013
@@ -0,0 +1,6 @@
+package org.apache.ace.agent.identification;
+
+public interface IdentificationHandler {
+
+    String getIdentification();
+}

Added: ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/identification/impl/IdentificationHandlerImpl.java
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/identification/impl/IdentificationHandlerImpl.java?rev=1513422&view=auto
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/identification/impl/IdentificationHandlerImpl.java (added)
+++ ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/identification/impl/IdentificationHandlerImpl.java Tue Aug 13 10:22:01 2013
@@ -0,0 +1,18 @@
+package org.apache.ace.agent.identification.impl;
+
+import org.apache.ace.agent.identification.IdentificationHandler;
+import org.apache.ace.agent.impl.AgentContext;
+
+public class IdentificationHandlerImpl implements IdentificationHandler {
+
+    private final AgentContext m_agentContext;
+
+    public IdentificationHandlerImpl(AgentContext agentContext) {
+        m_agentContext = agentContext;
+    }
+
+    @Override
+    public String getIdentification() {
+        return "agent";
+    }
+}

Added: ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/identification/packageinfo
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/identification/packageinfo?rev=1513422&view=auto
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/identification/packageinfo (added)
+++ ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/identification/packageinfo Tue Aug 13 10:22:01 2013
@@ -0,0 +1 @@
+version 1.0
\ No newline at end of file

Added: ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/impl/Activator.java
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/impl/Activator.java?rev=1513422&view=auto
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/impl/Activator.java (added)
+++ ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/impl/Activator.java Tue Aug 13 10:22:01 2013
@@ -0,0 +1,139 @@
+package org.apache.ace.agent.impl;
+
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+
+import org.apache.ace.agent.AgentControl;
+import org.apache.ace.agent.configuration.ConfigurationHandler;
+import org.apache.ace.agent.configuration.impl.ConfigurationHandlerImpl;
+import org.apache.ace.agent.connection.ConnectionHandler;
+import org.apache.ace.agent.connection.impl.ConnectionHandlerImpl;
+import org.apache.ace.agent.deployment.DeploymentHandler;
+import org.apache.ace.agent.deployment.impl.DeploymentHandlerImpl;
+import org.apache.ace.agent.discovery.DiscoveryHandler;
+import org.apache.ace.agent.discovery.impl.DiscoveryHandlerImpl;
+import org.apache.ace.agent.download.DownloadHandler;
+import org.apache.ace.agent.download.impl.DownloadHandlerImpl;
+import org.apache.ace.agent.identification.IdentificationHandler;
+import org.apache.ace.agent.identification.impl.IdentificationHandlerImpl;
+import org.apache.felix.dm.Component;
+import org.apache.felix.dm.DependencyActivatorBase;
+import org.apache.felix.dm.DependencyManager;
+import org.osgi.framework.BundleContext;
+
+public class Activator extends DependencyActivatorBase implements AgentContext {
+
+    private volatile ConfigurationHandler m_configurationHandler;
+    private volatile IdentificationHandler m_identificationHandler;
+    private volatile DiscoveryHandler m_discoveryHandler;
+    private volatile DeploymentHandler m_deploymentHandler;
+    private volatile DownloadHandler m_downloadHandler;
+    private volatile ConnectionHandler m_connectionHandler;
+    private volatile ScheduledExecutorService m_executorService;
+    private volatile AgentControlImpl m_agentControl;
+
+    private volatile DefaultController m_controller;
+
+    private DependencyManager m_manager;
+    private Component m_component;
+
+    @Override
+    public void init(BundleContext context, DependencyManager manager) throws Exception {
+
+        m_manager = manager;
+
+        m_executorService = Executors.newScheduledThreadPool(1);
+        m_configurationHandler = new ConfigurationHandlerImpl(this);
+        m_deploymentHandler = new DeploymentHandlerImpl(this);
+        m_downloadHandler = new DownloadHandlerImpl(this);
+        m_agentControl = new AgentControlImpl(this);
+
+        Component service = createComponent().setImplementation(this)
+            .setCallbacks("initAgent", "startAgent", "stopAgent", "destroyAgent")
+            .setAutoConfig(DependencyManager.class, false)
+            .setAutoConfig(Component.class, false);
+
+        if (Boolean.parseBoolean(System.getProperty("agent.identificationhandler.disabled"))) {
+            service.add(createServiceDependency().setService(IdentificationHandler.class).setRequired(true));
+        }
+        else {
+            m_identificationHandler = new IdentificationHandlerImpl(this);
+        }
+
+        if (Boolean.parseBoolean(System.getProperty("agent.discoveryhandler.disabled"))) {
+            service.add(createServiceDependency().setService(DiscoveryHandler.class).setRequired(true));
+        }
+        else {
+            m_discoveryHandler = new DiscoveryHandlerImpl(this);
+        }
+
+        if (Boolean.parseBoolean(System.getProperty("agent.connectionhandler.disabled"))) {
+            service.add(createServiceDependency().setService(DiscoveryHandler.class).setRequired(true));
+        }
+        else {
+            m_connectionHandler = new ConnectionHandlerImpl(this);
+        }
+
+        if (!Boolean.parseBoolean(System.getProperty("agent.defaultcontroller.disabled"))) {
+            m_controller = new DefaultController(m_agentControl, m_executorService);
+        }
+        
+        manager.add(service);
+    }
+
+    @Override
+    public void destroy(BundleContext context, DependencyManager manager) throws Exception {
+    }
+
+    void startAgent() throws Exception {
+        System.out.println("Starting agent!");
+        m_component = createComponent()
+            .setInterface(AgentControl.class.getName(), null)
+            .setImplementation(m_agentControl);
+        m_manager.add(m_component);
+        if (m_controller != null)
+            m_controller.start();
+    }
+
+    void stopAgent() throws Exception {
+        System.out.println("Stopping agent");
+        if (m_controller != null)
+            m_controller.stop();
+        m_manager.remove(m_component);
+    }
+
+    @Override
+    public IdentificationHandler getIdentificationHandler() {
+        return m_identificationHandler;
+    }
+
+    @Override
+    public DiscoveryHandler getDiscoveryHandler() {
+        return m_discoveryHandler;
+    }
+
+    @Override
+    public DeploymentHandler getDeploymentHandler() {
+        return m_deploymentHandler;
+    }
+
+    @Override
+    public ScheduledExecutorService getExecutorService() {
+        return m_executorService;
+    }
+
+    @Override
+    public ConfigurationHandler getConfiguration() {
+        return m_configurationHandler;
+    }
+
+    @Override
+    public ConnectionHandler getConnectionHandler() {
+        return m_connectionHandler;
+    }
+
+    @Override
+    public DownloadHandler getDownloadHandler() {
+        return m_downloadHandler;
+    }
+}

Added: ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/impl/AgentContext.java
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/impl/AgentContext.java?rev=1513422&view=auto
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/impl/AgentContext.java (added)
+++ ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/impl/AgentContext.java Tue Aug 13 10:22:01 2013
@@ -0,0 +1,27 @@
+package org.apache.ace.agent.impl;
+
+import java.util.concurrent.ScheduledExecutorService;
+
+import org.apache.ace.agent.configuration.ConfigurationHandler;
+import org.apache.ace.agent.connection.ConnectionHandler;
+import org.apache.ace.agent.deployment.DeploymentHandler;
+import org.apache.ace.agent.discovery.DiscoveryHandler;
+import org.apache.ace.agent.download.DownloadHandler;
+import org.apache.ace.agent.identification.IdentificationHandler;
+
+public interface AgentContext {
+
+    IdentificationHandler getIdentificationHandler();
+    
+    DiscoveryHandler getDiscoveryHandler();
+
+    ConnectionHandler getConnectionHandler();
+    
+    DeploymentHandler getDeploymentHandler();
+    
+    DownloadHandler getDownloadHandler();
+    
+    ScheduledExecutorService getExecutorService();
+    
+    ConfigurationHandler getConfiguration();
+}

Added: ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/impl/AgentControlImpl.java
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/impl/AgentControlImpl.java?rev=1513422&view=auto
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/impl/AgentControlImpl.java (added)
+++ ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/impl/AgentControlImpl.java Tue Aug 13 10:22:01 2013
@@ -0,0 +1,45 @@
+package org.apache.ace.agent.impl;
+
+import java.util.List;
+
+import org.apache.ace.agent.AgentControl;
+import org.apache.ace.agent.FeedbackChannel;
+import org.apache.ace.agent.configuration.ConfigurationHandler;
+import org.apache.ace.agent.deployment.DeploymentHandler;
+import org.apache.ace.agent.download.DownloadHandler;
+
+public class AgentControlImpl implements AgentControl {
+
+    private final AgentContext m_agentContext;
+
+    public AgentControlImpl(AgentContext agentContext) {
+        m_agentContext = agentContext;
+    }
+
+    @Override
+    public ConfigurationHandler getConfiguration() {
+        return m_agentContext.getConfiguration();
+    }
+
+    @Override
+    public DownloadHandler getDownloadHandler() {
+        return m_agentContext.getDownloadHandler();
+    }
+
+    @Override
+    public DeploymentHandler getDeploymentHandler() {
+        return m_agentContext.getDeploymentHandler();
+    }
+
+    @Override
+    public List<FeedbackChannel> getFeedbackChannels() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public FeedbackChannel getFeedbackChannel(String name) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+}

Modified: ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/impl/DefaultController.java
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/impl/DefaultController.java?rev=1513422&r1=1513421&r2=1513422&view=diff
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/impl/DefaultController.java (original)
+++ ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/impl/DefaultController.java Tue Aug 13 10:22:01 2013
@@ -1,32 +1,92 @@
 package org.apache.ace.agent.impl;
 
 import java.io.IOException;
+import java.util.SortedSet;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ScheduledFuture;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.ace.agent.AgentControl;
-import org.apache.ace.agent.FeedbackChannel;
+import org.apache.ace.agent.configuration.ConfigurationHandler;
+import org.apache.ace.agent.deployment.DeploymentHandler;
 import org.apache.ace.agent.deployment.RetryAfterException;
+import org.osgi.framework.Version;
 
-public class DefaultController {
+public class DefaultController implements Runnable {
 
-    private AgentControl m_control;
+    private final AgentControl m_agentControl;
+    private final ScheduledExecutorService m_executorService;
+    private volatile ScheduledFuture<?> m_future;
 
-    private void sync() {
+    public DefaultController(AgentControl agentControl, ScheduledExecutorService executorService) {
+        m_agentControl = agentControl;
+        m_executorService = executorService;
+    }
+
+    public void start() {
+        reSchedule(getSyncInterval());
+    }
 
-        m_control.getCurrentVersion();
+    public void stop() {
+        unSchedule();
+    }
+
+    public void run() {
 
-        for (FeedbackChannel channel : m_control.getFeedbackChannels()) {
-            if (channel.feedbackAvailable())
-                try {
-                    channel.sendFeedback();
-                }
-                catch (RetryAfterException e) {
-                    // TODO Auto-generated catch block
-                    e.printStackTrace();
-                }
-                catch (IOException e) {
-                    // TODO Auto-generated catch block
-                    e.printStackTrace();
-                }
+        long syncInterval = getSyncInterval();
+        try {
+            runSafe();
+        }
+        catch (RetryAfterException e) {
+            syncInterval = e.getSeconds();
         }
+        catch (IOException e) {
+            // TODO what to do
+            e.printStackTrace();
+        }
+        catch (Exception e) {
+            // TODO what to do
+            e.printStackTrace();
+        }
+        reSchedule(syncInterval);
+    }
+
+    public void runSafe() throws RetryAfterException, IOException {
+
+        DeploymentHandler deploymentHandler = getDeploymentHandler();
+
+        SortedSet<Version> installed = deploymentHandler.getInstalledVersions();
+        Version current = Version.emptyVersion;
+        if (installed != null && !installed.isEmpty())
+            current = installed.last();
+
+        SortedSet<Version> available = deploymentHandler.getAvailableVersions();
+        Version highest = Version.emptyVersion;
+        if (available != null && !available.isEmpty())
+            highest = available.last();
+
+        if (highest.compareTo(current) > 1)
+            deploymentHandler.deployPackage(highest, true);
+    }
+
+    private void reSchedule(long seconds) {
+        m_future = m_executorService.schedule(this, seconds, TimeUnit.SECONDS);
+    }
+
+    private void unSchedule() {
+        if(m_future != null)
+            m_future.cancel(true);
+    }
+
+    private long getSyncInterval() {
+        return getConfiguration().getSyncInterval();
+    }
+
+    private DeploymentHandler getDeploymentHandler() {
+        return m_agentControl.getDeploymentHandler();
+    }
+
+    private ConfigurationHandler getConfiguration() {
+        return m_agentControl.getConfiguration();
     }
 }

Added: ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/packageinfo
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/packageinfo?rev=1513422&view=auto
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/packageinfo (added)
+++ ace/sandbox/bramk/org.apache.ace.agent/src/org/apache/ace/agent/packageinfo Tue Aug 13 10:22:01 2013
@@ -0,0 +1 @@
+version 1.0
\ No newline at end of file



Mime
View raw message