You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by is...@apache.org on 2013/07/05 12:33:10 UTC
[33/34] git commit: committing refactoered adc components and top
level pom in components
committing refactoered adc components and top level pom in components
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/ca25b1f7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/ca25b1f7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/ca25b1f7
Branch: refs/heads/master
Commit: ca25b1f7b38e109d1752a3cf6c520f3cd8d9eb2e
Parents: d4f09bb
Author: Isuru <is...@wso2.com>
Authored: Fri Jul 5 15:49:06 2013 +0530
Committer: Isuru <is...@wso2.com>
Committed: Fri Jul 5 15:49:06 2013 +0530
----------------------------------------------------------------------
.../4.1.0/pom.xml | 211 +++
.../autoscaler/service/IAutoscalerService.java | 112 ++
.../exception/AutoscalerServiceException.java | 33 +
.../exception/DeserializationException.java | 33 +
.../MalformedConfigurationFileException.java | 33 +
.../exception/NoInstanceFoundException.java | 39 +
.../exception/SerializationException.java | 33 +
.../service/impl/AutoscalerServiceImpl.java | 1389 ++++++++++++++++++
.../internal/AutoscalerServiceDSComponent.java | 48 +
.../autoscaler/service/io/Deserializer.java | 68 +
.../autoscaler/service/io/Serializer.java | 61 +
.../service/jcloud/ComputeServiceBuilder.java | 65 +
.../service/util/AutoscalerConstant.java | 73 +
.../autoscaler/service/util/IaasContext.java | 391 +++++
.../autoscaler/service/util/IaasProvider.java | 141 ++
.../service/util/InstanceContext.java | 93 ++
.../service/util/ServiceTemplate.java | 84 ++
.../xml/ElasticScalerConfigFileReader.java | 557 +++++++
.../src/main/resources/META-INF/services.xml | 9 +
.../service/util/IaasContextComparatorTest.java | 98 ++
.../service/util/IaasContextTest.java | 113 ++
.../xml/ElasticScalerConfigFileReaderTest.java | 60 +
.../test/resources/elastic-scaler-config.xml | 71 +
.../4.1.3/pom.xml | 138 ++
.../callables/AppNodeSanityCheckCallable.java | 86 ++
.../callables/AutoscaleDeciderCallable.java | 241 +++
.../callables/InstanceCountCallable.java | 78 +
.../callables/PendingInstanceCountCallable.java | 65 +
.../callables/RunningInstanceCountCallable.java | 68 +
.../clients/CloudControllerClient.java | 66 +
.../clients/CloudControllerOsgiClient.java | 82 ++
.../clients/CloudControllerStubClient.java | 93 ++
.../lbautoscale/context/AppDomainContext.java | 170 +++
.../context/LoadBalancerContext.java | 104 ++
.../AutoscalerTaskServiceComponent.java | 325 ++++
.../lbautoscale/internal/RegistryManager.java | 54 +
.../mediators/AutoscaleInMediator.java | 174 +++
.../mediators/AutoscaleOutMediator.java | 78 +
.../check/PendingInstancesStateChecker.java | 148 ++
.../check/TerminatingInstancesStateChecker.java | 89 ++
.../task/AutoscalerTaskInitializer.java | 50 +
.../task/AutoscalerTaskMgmtAdminService.java | 348 +++++
.../lbautoscale/task/AutoscalingJob.java | 68 +
.../task/ServiceRequestsInFlightAutoscaler.java | 524 +++++++
.../lbautoscale/task/TaskSchedulingManager.java | 188 +++
.../lbautoscale/util/AutoscaleConstants.java | 68 +
.../lbautoscale/util/AutoscaleUtil.java | 359 +++++
.../util/AutoscalerTaskDSHolder.java | 129 ++
...rg.apache.synapse.config.xml.MediatorFactory | 2 +
...apache.synapse.config.xml.MediatorSerializer | 2 +
.../src/main/resources/synapse-load-average.xml | 138 ++
.../resources/synapse-messages-in-flight.xml | 135 ++
.../synapse-service-messages-in-flight.xml | 108 ++
.../lbautoscale/AppDomainContextsTest.java | 105 ++
.../4.1.3/src/test/resources/loadbalancer.conf | 50 +
.../4.1.3/pom.xml | 117 ++
.../stratos/lb/endpoint/EndpointConstants.java | 31 +
.../stratos/lb/endpoint/EndpointDeployer.java | 71 +
...TenantAwareLoadBalanceEndpointException.java | 39 +
.../TenantLoadBalanceMembershipHandler.java | 208 +++
.../lb/endpoint/builder/TopologySyncher.java | 159 ++
.../manager/ClusterDomainManagerImpl.java | 228 +++
.../TenantAwareLoadBalanceEndpoint.java | 531 +++++++
.../group/mgt/GroupMgtAgentBuilder.java | 80 +
.../LoadBalanceEndpointServiceComponent.java | 397 +++++
.../lb/endpoint/internal/RegistryManager.java | 54 +
.../endpoint/subscriber/TopicHealthChecker.java | 68 +
.../endpoint/subscriber/TopologyListener.java | 47 +
.../endpoint/subscriber/TopologySubscriber.java | 95 ++
.../stratos/lb/endpoint/util/ConfigHolder.java | 192 +++
.../lb/endpoint/util/TopologyConstants.java | 31 +
.../4.1.0/pom.xml | 210 ---
.../autoscaler/service/IAutoscalerService.java | 112 --
.../exception/AutoscalerServiceException.java | 33 -
.../exception/DeserializationException.java | 33 -
.../MalformedConfigurationFileException.java | 33 -
.../exception/NoInstanceFoundException.java | 39 -
.../exception/SerializationException.java | 33 -
.../service/impl/AutoscalerServiceImpl.java | 1389 ------------------
.../internal/AutoscalerServiceDSComponent.java | 48 -
.../autoscaler/service/io/Deserializer.java | 68 -
.../autoscaler/service/io/Serializer.java | 61 -
.../service/jcloud/ComputeServiceBuilder.java | 65 -
.../service/util/AutoscalerConstant.java | 73 -
.../autoscaler/service/util/IaasContext.java | 391 -----
.../autoscaler/service/util/IaasProvider.java | 141 --
.../service/util/InstanceContext.java | 93 --
.../service/util/ServiceTemplate.java | 84 --
.../xml/ElasticScalerConfigFileReader.java | 557 -------
.../src/main/resources/META-INF/services.xml | 9 -
.../service/util/IaasContextComparatorTest.java | 98 --
.../service/util/IaasContextTest.java | 113 --
.../xml/ElasticScalerConfigFileReaderTest.java | 60 -
.../test/resources/elastic-scaler-config.xml | 71 -
.../4.1.3/pom.xml | 138 --
.../callables/AppNodeSanityCheckCallable.java | 86 --
.../callables/AutoscaleDeciderCallable.java | 241 ---
.../callables/InstanceCountCallable.java | 78 -
.../callables/PendingInstanceCountCallable.java | 65 -
.../callables/RunningInstanceCountCallable.java | 68 -
.../clients/CloudControllerClient.java | 66 -
.../clients/CloudControllerOsgiClient.java | 82 --
.../clients/CloudControllerStubClient.java | 93 --
.../lbautoscale/context/AppDomainContext.java | 170 ---
.../context/LoadBalancerContext.java | 104 --
.../AutoscalerTaskServiceComponent.java | 325 ----
.../lbautoscale/internal/RegistryManager.java | 54 -
.../mediators/AutoscaleInMediator.java | 174 ---
.../mediators/AutoscaleOutMediator.java | 78 -
.../check/PendingInstancesStateChecker.java | 148 --
.../check/TerminatingInstancesStateChecker.java | 89 --
.../task/AutoscalerTaskInitializer.java | 50 -
.../task/AutoscalerTaskMgmtAdminService.java | 348 -----
.../lbautoscale/task/AutoscalingJob.java | 68 -
.../task/ServiceRequestsInFlightAutoscaler.java | 524 -------
.../lbautoscale/task/TaskSchedulingManager.java | 188 ---
.../lbautoscale/util/AutoscaleConstants.java | 68 -
.../lbautoscale/util/AutoscaleUtil.java | 359 -----
.../util/AutoscalerTaskDSHolder.java | 129 --
...rg.apache.synapse.config.xml.MediatorFactory | 2 -
...apache.synapse.config.xml.MediatorSerializer | 2 -
.../src/main/resources/synapse-load-average.xml | 138 --
.../resources/synapse-messages-in-flight.xml | 135 --
.../synapse-service-messages-in-flight.xml | 108 --
.../lbautoscale/AppDomainContextsTest.java | 105 --
.../4.1.3/src/test/resources/loadbalancer.conf | 50 -
.../4.1.3/pom.xml | 117 --
.../stratos/lb/endpoint/EndpointConstants.java | 31 -
.../stratos/lb/endpoint/EndpointDeployer.java | 71 -
...TenantAwareLoadBalanceEndpointException.java | 39 -
.../TenantLoadBalanceMembershipHandler.java | 208 ---
.../lb/endpoint/builder/TopologySyncher.java | 159 --
.../manager/ClusterDomainManagerImpl.java | 228 ---
.../TenantAwareLoadBalanceEndpoint.java | 531 -------
.../group/mgt/GroupMgtAgentBuilder.java | 80 -
.../LoadBalanceEndpointServiceComponent.java | 397 -----
.../lb/endpoint/internal/RegistryManager.java | 54 -
.../endpoint/subscriber/TopicHealthChecker.java | 68 -
.../endpoint/subscriber/TopologyListener.java | 47 -
.../endpoint/subscriber/TopologySubscriber.java | 95 --
.../stratos/lb/endpoint/util/ConfigHolder.java | 192 ---
.../lb/endpoint/util/TopologyConstants.java | 31 -
.../org.apache.stratos.lb.common/4.1.3/pom.xml | 120 --
.../stratos/lb/common/cache/LRUCache.java | 103 --
.../lb/common/cache/URLMappingCache.java | 47 -
.../common/conf/LoadBalancerConfiguration.java | 1206 ---------------
.../LoadBalancerConfigurationDSComponent.java | 51 -
.../stratos/lb/common/conf/structure/Node.java | 356 -----
.../lb/common/conf/structure/NodeBuilder.java | 140 --
.../stratos/lb/common/conf/util/Constants.java | 50 -
.../lb/common/conf/util/HostContext.java | 161 --
.../conf/util/LoadBalancerConfigUtil.java | 291 ----
.../common/conf/util/TenantDomainContext.java | 80 -
.../mgt/SubDomainAwareGroupManagementAgent.java | 58 -
.../RequestTokenReplicationCommand.java | 73 -
.../LoadBalancerConfigurationService.java | 79 -
.../LoadBalancerConfigurationServiceImpl.java | 60 -
.../stratos/lb/common/util/DomainMapping.java | 40 -
.../src/main/resources/META-INF/services.xml | 9 -
.../test/LoadBalancerConfigurationTest.java | 169 ---
.../stratos/lb/common/test/NodeBuilderTest.java | 124 --
.../4.1.3/src/test/resources/loadbalancer.conf | 64 -
.../4.1.3/src/test/resources/loadbalancer1.conf | 39 -
.../4.1.3/src/test/resources/loadbalancer2.conf | 30 -
.../4.1.3/src/test/resources/testng.xml | 15 -
components/load-balancer/pom.xml | 69 -
.../2.1.3/pom.xml | 125 ++
.../2.1.3/src/main/assembly/src.xml | 36 +
.../2.1.3/src/main/java/Main.iml | 204 +++
.../org/apache/stratos/adc/mgt/cli/CliTool.java | 76 +
.../org/apache/stratos/adc/mgt/cli/Command.java | 67 +
.../stratos/adc/mgt/cli/CommandContext.java | 88 ++
.../adc/mgt/cli/CommandLineApplication.java | 190 +++
.../stratos/adc/mgt/cli/CommandLineService.java | 556 +++++++
.../stratos/adc/mgt/cli/StratosApplication.java | 504 +++++++
.../adc/mgt/cli/StratosCommandContext.java | 31 +
.../cli/commands/AddDomainMappingCommand.java | 87 ++
.../adc/mgt/cli/commands/CartridgesCommand.java | 71 +
.../adc/mgt/cli/commands/ExitCommand.java | 70 +
.../adc/mgt/cli/commands/HelpCommand.java | 73 +
.../adc/mgt/cli/commands/InfoCommand.java | 75 +
.../adc/mgt/cli/commands/ListCommand.java | 123 ++
.../adc/mgt/cli/commands/PoliciesCommand.java | 71 +
.../commands/RemoveDomainMappingCommand.java | 75 +
.../adc/mgt/cli/commands/SubscribeCommand.java | 208 +++
.../adc/mgt/cli/commands/SyncCommand.java | 76 +
.../mgt/cli/commands/UnsubscribeCommand.java | 130 ++
.../adc/mgt/cli/completer/CommandCompleter.java | 133 ++
.../adc/mgt/cli/exception/CommandException.java | 39 +
.../stratos/adc/mgt/cli/utils/CliConstants.java | 130 ++
.../adc/mgt/cli/utils/CommandLineUtils.java | 94 ++
.../stratos/adc/mgt/cli/utils/RowMapper.java | 23 +
.../src/main/resources/Resources.properties | 25 +
.../2.1.3/src/main/resources/log4j.properties | 15 +
.../2.1.3/src/main/resources/wso2carbon.jks | Bin 0 -> 33260 bytes
.../2.1.1/pom.xml | 2 +-
.../org.apache.stratos.lb.common/4.1.3/pom.xml | 120 ++
.../stratos/lb/common/cache/LRUCache.java | 103 ++
.../lb/common/cache/URLMappingCache.java | 47 +
.../common/conf/LoadBalancerConfiguration.java | 1206 +++++++++++++++
.../LoadBalancerConfigurationDSComponent.java | 51 +
.../stratos/lb/common/conf/structure/Node.java | 356 +++++
.../lb/common/conf/structure/NodeBuilder.java | 140 ++
.../stratos/lb/common/conf/util/Constants.java | 50 +
.../lb/common/conf/util/HostContext.java | 161 ++
.../conf/util/LoadBalancerConfigUtil.java | 291 ++++
.../common/conf/util/TenantDomainContext.java | 80 +
.../mgt/SubDomainAwareGroupManagementAgent.java | 58 +
.../RequestTokenReplicationCommand.java | 73 +
.../LoadBalancerConfigurationService.java | 79 +
.../LoadBalancerConfigurationServiceImpl.java | 60 +
.../stratos/lb/common/util/DomainMapping.java | 40 +
.../src/main/resources/META-INF/services.xml | 9 +
.../test/LoadBalancerConfigurationTest.java | 169 +++
.../stratos/lb/common/test/NodeBuilderTest.java | 124 ++
.../4.1.3/src/test/resources/loadbalancer.conf | 64 +
.../4.1.3/src/test/resources/loadbalancer1.conf | 39 +
.../4.1.3/src/test/resources/loadbalancer2.conf | 30 +
.../4.1.3/src/test/resources/testng.xml | 15 +
.../org.wso2.carbon.adc.mgt.cli/2.1.3/pom.xml | 125 --
.../2.1.3/src/main/assembly/src.xml | 33 -
.../org/wso2/carbon/adc/mgt/cli/CliTool.java | 73 -
.../org/wso2/carbon/adc/mgt/cli/Command.java | 64 -
.../wso2/carbon/adc/mgt/cli/CommandContext.java | 85 --
.../adc/mgt/cli/CommandLineApplication.java | 187 ---
.../carbon/adc/mgt/cli/CommandLineService.java | 553 -------
.../carbon/adc/mgt/cli/StratosApplication.java | 501 -------
.../adc/mgt/cli/StratosCommandContext.java | 28 -
.../cli/commands/AddDomainMappingCommand.java | 84 --
.../adc/mgt/cli/commands/CartridgesCommand.java | 68 -
.../adc/mgt/cli/commands/ExitCommand.java | 67 -
.../adc/mgt/cli/commands/HelpCommand.java | 70 -
.../adc/mgt/cli/commands/InfoCommand.java | 72 -
.../adc/mgt/cli/commands/ListCommand.java | 120 --
.../adc/mgt/cli/commands/PoliciesCommand.java | 68 -
.../commands/RemoveDomainMappingCommand.java | 72 -
.../adc/mgt/cli/commands/SubscribeCommand.java | 205 ---
.../adc/mgt/cli/commands/SyncCommand.java | 73 -
.../mgt/cli/commands/UnsubscribeCommand.java | 127 --
.../adc/mgt/cli/completer/CommandCompleter.java | 130 --
.../adc/mgt/cli/exception/CommandException.java | 36 -
.../carbon/adc/mgt/cli/utils/CliConstants.java | 111 --
.../carbon/adc/mgt/cli/utils/CliMessages.java | 0
.../adc/mgt/cli/utils/CommandLineUtils.java | 91 --
.../carbon/adc/mgt/cli/utils/RowMapper.java | 20 -
.../src/main/resources/Resources.properties | 25 -
.../2.1.3/src/main/resources/log4j.properties | 15 -
.../2.1.3/src/main/resources/wso2carbon.jks | Bin 33260 -> 0 bytes
components/pom.xml | 45 +-
249 files changed, 17287 insertions(+), 17048 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ca25b1f7/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/pom.xml
----------------------------------------------------------------------
diff --git a/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/pom.xml b/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/pom.xml
new file mode 100644
index 0000000..61a4006
--- /dev/null
+++ b/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/pom.xml
@@ -0,0 +1,211 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <parent>
+ <groupId>org.apache.stratos</groupId>
+ <artifactId>stratos-components-parent</artifactId>
+ <version>2.0.0</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.stratos</groupId>
+ <artifactId>org.apache.stratos.autoscaler.service</artifactId>
+ <packaging>aar</packaging>
+ <name>Apache Stratos - Autoscaler Service</name>
+ <url>http://apache.org</url>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>1.7.1</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <artifactSet>
+ <includes>
+ <include>org.jclouds:*</include>
+ <include>org.jclouds.*:*</include>
+ </includes>
+ </artifactSet>
+ <filtering>true</filtering>
+ <filters>
+ <filter>
+ <artifact>org.jclouds*:*</artifact>
+ <includes>
+ <include>META-INF/services/org.jclouds.apis.ApiMetadata</include>
+ <include>META-INF/services/org.jclouds.providers.ProviderMetadata</include>
+ </includes>
+ </filter>
+ </filters>
+ <transformers>
+ <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer">
+ </transformer>
+ </transformers>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.axis2</groupId>
+ <artifactId>axis2-aar-maven-plugin</artifactId>
+ <version>1.4</version>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-scr-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>1.4.0</version>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+ <Bundle-Name>${project.artifactId}</Bundle-Name>
+ <Export-Package>
+ org.apache.stratos.autoscaler.service
+ </Export-Package>
+ <Private-Package>
+ org.apache.stratos.autoscaler.service.*, !org.apache.stratos.autoscaler.service
+ </Private-Package>
+ <Import-Package>
+ !org.apache.commons.logging,
+ org.apache.commons.logging; version=0.0.0,
+ org.wso2.carbon.utils.*,
+ org.jclouds.compute*;version="${jclouds.version}";resolution:=optional,
+ org.jclouds*;version="${jclouds.version}",
+ *; resolution:=optional
+ </Import-Package>
+ <DynamicImport-Package>*</DynamicImport-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.wso2.carbon</groupId>
+ <artifactId>org.wso2.carbon.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.wso2.carbon</groupId>
+ <artifactId>org.wso2.carbon.utils</artifactId>
+ <version>${wso2carbon.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.stratos</groupId>
+ <artifactId>org.apache.stratos.lb.common</artifactId>
+ <version>4.1.3</version>
+ <!--version>${wso2carbon.version}</version-->
+ </dependency>
+ <dependency>
+ <groupId>org.wso2.carbon</groupId>
+ <artifactId>org.wso2.carbon.securevault</artifactId>
+ <version>4.1.0</version>
+ <!--version>${wso2carbon.version}</version-->
+ </dependency>
+ <!--dependency>
+ <groupId>org.apache.synapse</groupId>
+ <artifactId>synapse-core</artifactId>
+ <version>${synapse.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.synapse</groupId>
+ <artifactId>synapse-commons</artifactId>
+ <version>${synapse.version}</version>
+ </dependency-->
+
+ <!-- Jclouds dependencies -->
+ <dependency>
+ <groupId>org.jclouds</groupId>
+ <artifactId>jclouds-allcompute</artifactId>
+ <version>${jclouds.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jclouds</groupId>
+ <artifactId>jclouds-compute</artifactId>
+ <version>${jclouds.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jclouds.driver</groupId>
+ <artifactId>jclouds-bouncycastle</artifactId>
+ <version>${jclouds.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcprov-jdk16</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.jclouds.driver</groupId>
+ <artifactId>jclouds-sshj</artifactId>
+ <version>${jclouds.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jclouds.driver</groupId>
+ <artifactId>jclouds-log4j</artifactId>
+ <version>${jclouds.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jclouds.driver</groupId>
+ <artifactId>jclouds-enterprise</artifactId>
+ <version>${jclouds.version}</version>
+ </dependency>
+ <!--dependency>
+ <groupId>org.jclouds.api</groupId>
+ <artifactId>ec2</artifactId>
+ <version>${jclouds.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jclouds.provider</groupId>
+ <artifactId>aws-ec2</artifactId>
+ <version>${jclouds.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jclouds.api</groupId>
+ <artifactId>openstack-nova</artifactId>
+ <version>${jclouds.version}</version>
+ </dependency-->
+
+ </dependencies>
+
+ <properties>
+ <jclouds.version>1.5.0-beta.5</jclouds.version>
+ </properties>
+
+</project>
+
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ca25b1f7/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/src/main/java/org/apache/stratos/autoscaler/service/IAutoscalerService.java
----------------------------------------------------------------------
diff --git a/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/src/main/java/org/apache/stratos/autoscaler/service/IAutoscalerService.java b/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/src/main/java/org/apache/stratos/autoscaler/service/IAutoscalerService.java
new file mode 100644
index 0000000..9bf06fc
--- /dev/null
+++ b/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/src/main/java/org/apache/stratos/autoscaler/service/IAutoscalerService.java
@@ -0,0 +1,112 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.apache.stratos.autoscaler.service;
+
+import org.apache.stratos.lb.common.conf.util.Constants;
+
+/**
+ * This Interface provides a way for a component, to communicate with an underline
+ * Infrastructure which are supported by <i>JClouds</i>.
+ *
+ */
+public interface IAutoscalerService {
+
+ /**
+ * Initialize the service.
+ * @param isSpi if this service is to be used by SPI, this parameter should be set to
+ * true. When this is true, you should specify an image id, each time you
+ * are starting an instance i.e. you should use {@link #startSpiInstance(String, String)}
+ * method, instead of using {@link #startInstance(String)}.
+ * @return
+ */
+ public boolean initAutoscaler(boolean isSpi);
+
+
+ /**
+ * Calling this method will result in an instance startup, which is belong
+ * to the provided service domain. This method is non-blocking, means we do not
+ * wait till the instance is started up. Also note that the instance that is starting up
+ * belongs to the group whose name is derived from its service domain, replacing <i>.</i>
+ * by a hyphen (<i>-</i>).
+ * @param domainName service clustering domain of the instance to be started up.
+ * @param sudDomainName service clustering sub domain of the instance to be started up.
+ * If this is null, the default value will be used. Default value is
+ * {@link Constants}.DEFAULT_SUB_DOMAIN.
+ * @return whether the starting up is successful or not.
+ */
+ public boolean startInstance(String domainName, String sudDomainName);
+
+ /**
+ * Calling this method will result in an instance startup, which is belong
+ * to the provided service domain. This method will return the public IP address of
+ * the instance that is started. Thus, this method is blocking, since we need to
+ * return the IP Address and for that we have to wait till the instance started up.
+ * @param domainName should be in following format.
+ * <code>${service-domain}\t\${tenant-id}</code>.
+ * @param imageId starting instance will be an instance of this image. Image id should
+ * be a valid one.
+ * @param sudDomainName service clustering sub domain of the instance to be started up.
+ * If this is null, the default value will be used. Default value is
+ * {@link Constants}.DEFAULT_SUB_DOMAIN.
+ * @return public IP address of the instance in String format. If instance failed to
+ * start, this will return an empty String.
+ */
+ public String startSpiInstance(String domainName, String subDomainName, String imageId);
+
+
+ /**
+ * Calling this method will result in termination of an instance which is belong
+ * to the provided service domain.
+ * @param domainName service domain of the instance to be terminated.
+ * @param sudDomainName service clustering sub domain of the instance to be started up.
+ * If this is null, the default value will be used. Default value is {@link Constants}.DEFAULT_SUB_DOMAIN.
+ * @return whether an instance terminated successfully or not.
+ */
+ public boolean terminateInstance(String domainName, String subDomainName);
+
+ /**
+ * Calling this method will result in termination of the lastly spawned instance which is
+ * belong to the provided service domain.
+ * @param domainName service domain of the instance to be terminated.
+ * @param sudDomainName service clustering sub domain of the instance to be started up.
+ * If this is null, the default value will be used. Default value is {@link Constants}.DEFAULT_SUB_DOMAIN.
+ * @return whether the termination is successful or not.
+ */
+ public boolean terminateLastlySpawnedInstance(String domainName, String subDomainName);
+
+ /**
+ * Calling this method will result in termination of an instance which has the
+ * provided public IP address.
+ * @param publicIp public IP address of the instance to be terminated.
+ * @return whether the instance terminated successfully or not.
+ */
+ public boolean terminateSpiInstance(String publicIp);
+
+ /**
+ * Calling this method will result in returning the pending instances
+ * count of a particular domain.
+ * @param domainName service domain
+ * @param sudDomainName service clustering sub domain of the instance to be started up.
+ * If this is null, the default value will be used. Default value is {@link Constants}.DEFAULT_SUB_DOMAIN.
+ * @return number of pending instances for this domain. If no instances of this
+ * domain is present, this will return zero.
+ */
+ public int getPendingInstanceCount(String domainName, String subDomainName);
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ca25b1f7/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/src/main/java/org/apache/stratos/autoscaler/service/exception/AutoscalerServiceException.java
----------------------------------------------------------------------
diff --git a/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/src/main/java/org/apache/stratos/autoscaler/service/exception/AutoscalerServiceException.java b/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/src/main/java/org/apache/stratos/autoscaler/service/exception/AutoscalerServiceException.java
new file mode 100644
index 0000000..70e82c8
--- /dev/null
+++ b/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/src/main/java/org/apache/stratos/autoscaler/service/exception/AutoscalerServiceException.java
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.apache.stratos.autoscaler.service.exception;
+
+public class AutoscalerServiceException extends RuntimeException {
+
+ private static final long serialVersionUID = -6326227079367867222L;
+
+ public AutoscalerServiceException(String msg) {
+ super(msg);
+ }
+
+ public AutoscalerServiceException(String msg, Exception ex) {
+ super(msg, ex);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ca25b1f7/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/src/main/java/org/apache/stratos/autoscaler/service/exception/DeserializationException.java
----------------------------------------------------------------------
diff --git a/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/src/main/java/org/apache/stratos/autoscaler/service/exception/DeserializationException.java b/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/src/main/java/org/apache/stratos/autoscaler/service/exception/DeserializationException.java
new file mode 100644
index 0000000..01819d1
--- /dev/null
+++ b/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/src/main/java/org/apache/stratos/autoscaler/service/exception/DeserializationException.java
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.apache.stratos.autoscaler.service.exception;
+
+public class DeserializationException extends RuntimeException {
+
+ private static final long serialVersionUID = -2426068347954381831L;
+
+ public DeserializationException(String msg) {
+ super(msg);
+ }
+
+ public DeserializationException(String msg, Exception ex) {
+ super(msg, ex);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ca25b1f7/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/src/main/java/org/apache/stratos/autoscaler/service/exception/MalformedConfigurationFileException.java
----------------------------------------------------------------------
diff --git a/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/src/main/java/org/apache/stratos/autoscaler/service/exception/MalformedConfigurationFileException.java b/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/src/main/java/org/apache/stratos/autoscaler/service/exception/MalformedConfigurationFileException.java
new file mode 100644
index 0000000..090e931
--- /dev/null
+++ b/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/src/main/java/org/apache/stratos/autoscaler/service/exception/MalformedConfigurationFileException.java
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.apache.stratos.autoscaler.service.exception;
+
+public class MalformedConfigurationFileException extends RuntimeException {
+
+ private static final long serialVersionUID = -1662095377704279326L;
+
+ public MalformedConfigurationFileException(String msg) {
+ super(msg);
+ }
+
+ public MalformedConfigurationFileException(String msg, Exception ex) {
+ super(msg, ex);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ca25b1f7/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/src/main/java/org/apache/stratos/autoscaler/service/exception/NoInstanceFoundException.java
----------------------------------------------------------------------
diff --git a/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/src/main/java/org/apache/stratos/autoscaler/service/exception/NoInstanceFoundException.java b/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/src/main/java/org/apache/stratos/autoscaler/service/exception/NoInstanceFoundException.java
new file mode 100644
index 0000000..be9356f
--- /dev/null
+++ b/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/src/main/java/org/apache/stratos/autoscaler/service/exception/NoInstanceFoundException.java
@@ -0,0 +1,39 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.apache.stratos.autoscaler.service.exception;
+
+/**
+ * This will throw when no instance is found
+ */
+public class NoInstanceFoundException extends Exception {
+
+ /**
+ * For serializing requirement
+ */
+ private static final long serialVersionUID = -435060299292679892L;
+
+
+ public NoInstanceFoundException(String msg) {
+ super(msg);
+ }
+
+ public NoInstanceFoundException(String msg, Exception ex) {
+ super(msg, ex);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ca25b1f7/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/src/main/java/org/apache/stratos/autoscaler/service/exception/SerializationException.java
----------------------------------------------------------------------
diff --git a/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/src/main/java/org/apache/stratos/autoscaler/service/exception/SerializationException.java b/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/src/main/java/org/apache/stratos/autoscaler/service/exception/SerializationException.java
new file mode 100644
index 0000000..0ccbd61
--- /dev/null
+++ b/components/autoscaler-service/org.apache.stratos.autoscaler.service/4.1.0/src/main/java/org/apache/stratos/autoscaler/service/exception/SerializationException.java
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.apache.stratos.autoscaler.service.exception;
+
+public class SerializationException extends RuntimeException {
+
+ private static final long serialVersionUID = -3701458642228072331L;
+
+ public SerializationException(String msg) {
+ super(msg);
+ }
+
+ public SerializationException(String msg, Exception ex) {
+ super(msg, ex);
+ }
+
+}