organizing the packages in Autoscaler

Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/e9902546
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/e9902546
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/e9902546

Branch: refs/heads/master
Commit: e990254695e7cb6de5bb4323c15e5415ad948611
Parents: dd1be21
Author: reka <[email protected]>
Authored: Fri Nov 28 16:45:01 2014 +0530
Committer: reka <[email protected]>
Committed: Fri Nov 28 16:45:24 2014 +0530

----------------------------------------------------------------------
 .../autoscaler/api/AutoScalerServiceImpl.java   |   6 +
 .../applications/ApplicationUtils.java          |   2 +-
 .../dependency/DependencyBuilder.java           |   2 +-
 .../applications/parser/ApplicationParser.java  |   2 +-
 .../parser/DefaultApplicationParser.java        |   4 +-
 .../applications/parser/ParserUtils.java        |   2 +-
 .../applications/payload/PayloadFactory.java    |   2 +-
 .../applications/topic/ApplicationBuilder.java  |   4 +-
 .../client/CloudControllerClient.java           |   6 +-
 .../autoscaler/context/AutoscalerContext.java   |   2 +-
 .../context/cluster/ClusterContextFactory.java  |   4 +-
 .../AutoscalerTopologyEventReceiver.java        |  14 +-
 .../ApplicationDefinitionException.java         |  48 --
 .../CartridgeInformationException.java          |  47 --
 .../exception/DependencyBuilderException.java   |  48 --
 .../InvalidKubernetesGroupException.java        |  49 --
 .../InvalidKubernetesHostException.java         |  49 --
 .../InvalidKubernetesMasterException.java       |  27 -
 .../exception/InvalidPartitionException.java    |  51 --
 .../exception/InvalidPolicyException.java       |  46 --
 .../exception/InvalidServiceGroupException.java |  46 --
 .../KubernetesEndpointValidationException.java  |  52 --
 .../NonExistingKubernetesGroupException.java    |  49 --
 .../NonExistingKubernetesHostException.java     |  48 --
 .../NonExistingKubernetesMasterException.java   |  48 --
 .../exception/NonExistingLBException.java       |  54 --
 .../ParentMonitorNotFoundException.java         |  56 --
 .../exception/PartitionValidationException.java |  54 --
 .../exception/PolicyValidationException.java    |  56 --
 .../autoscaler/exception/SpawningException.java |  51 --
 .../exception/TerminationException.java         |  45 --
 .../TopologyInConsistentException.java          |  47 --
 .../ApplicationDefinitionException.java         |  48 ++
 .../application/DependencyBuilderException.java |  48 ++
 .../ParentMonitorNotFoundException.java         |  56 ++
 .../TopologyInConsistentException.java          |  47 ++
 .../CartridgeInformationException.java          |  47 ++
 .../cartridge/NonExistingLBException.java       |  54 ++
 .../exception/cartridge/SpawningException.java  |  51 ++
 .../cartridge/TerminationException.java         |  45 ++
 .../InvalidKubernetesGroupException.java        |  49 ++
 .../InvalidKubernetesHostException.java         |  49 ++
 .../InvalidKubernetesMasterException.java       |  27 +
 .../InvalidServiceGroupException.java           |  46 ++
 .../KubernetesEndpointValidationException.java  |  52 ++
 .../NonExistingKubernetesGroupException.java    |  49 ++
 .../NonExistingKubernetesHostException.java     |  48 ++
 .../NonExistingKubernetesMasterException.java   |  48 ++
 .../partition/InvalidPartitionException.java    |  51 ++
 .../partition/PartitionValidationException.java |  54 ++
 .../policy/InvalidPolicyException.java          |  46 ++
 .../policy/PolicyValidationException.java       |  56 ++
 .../interfaces/AutoScalerServiceInterface.java  |  13 +-
 .../kubernetes/KubernetesManager.java           |   2 +-
 .../stratos/autoscaler/monitor/Monitor.java     |   2 +
 .../autoscaler/monitor/MonitorFactory.java      | 256 ++++++++
 .../monitor/MonitorStatusEventBuilder.java      |  92 ---
 .../monitor/ParentComponentMonitor.java         | 640 ------------------
 .../monitor/application/ApplicationMonitor.java | 287 ---------
 .../application/ApplicationMonitorFactory.java  | 256 --------
 .../monitor/cluster/AbstractClusterMonitor.java |   2 +-
 .../monitor/cluster/ClusterMonitorFactory.java  |  19 +-
 .../cluster/KubernetesClusterMonitor.java       |   2 +-
 .../monitor/cluster/VMClusterMonitor.java       |   2 +-
 .../cluster/VMServiceClusterMonitor.java        |   2 +-
 .../monitor/component/ApplicationMonitor.java   | 285 ++++++++
 .../monitor/component/GroupMonitor.java         | 336 ++++++++++
 .../component/ParentComponentMonitor.java       | 645 +++++++++++++++++++
 .../builder/MonitorStatusEventBuilder.java      |  91 +++
 .../autoscaler/monitor/group/GroupMonitor.java  | 338 ----------
 .../autoscaler/partition/PartitionManager.java  |   4 +-
 .../autoscaler/policy/PolicyManager.java        |   4 +-
 .../autoscaler/rule/RuleTasksDelegator.java     |   2 +-
 .../impl/CloudControllerServiceImpl.java        |   5 +
 .../interfaces/CloudControllerService.java      |   9 +
 75 files changed, 2649 insertions(+), 2637 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java
index e15df5f..73a891a 100644
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java
+++ 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java
@@ -29,6 +29,12 @@ import 
org.apache.stratos.autoscaler.applications.pojo.ApplicationContext;
 import org.apache.stratos.autoscaler.applications.topic.ApplicationBuilder;
 import org.apache.stratos.autoscaler.client.CloudControllerClient;
 import org.apache.stratos.autoscaler.exception.*;
+import 
org.apache.stratos.autoscaler.exception.application.ApplicationDefinitionException;
+import 
org.apache.stratos.autoscaler.exception.cartridge.NonExistingLBException;
+import org.apache.stratos.autoscaler.exception.kubernetes.*;
+import 
org.apache.stratos.autoscaler.exception.partition.InvalidPartitionException;
+import 
org.apache.stratos.autoscaler.exception.partition.PartitionValidationException;
+import org.apache.stratos.autoscaler.exception.policy.InvalidPolicyException;
 import org.apache.stratos.autoscaler.interfaces.AutoScalerServiceInterface;
 import org.apache.stratos.autoscaler.kubernetes.KubernetesManager;
 import org.apache.stratos.autoscaler.monitor.cluster.AbstractClusterMonitor;

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/ApplicationUtils.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/ApplicationUtils.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/ApplicationUtils.java
index a8aab5e..ef0e5b6 100644
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/ApplicationUtils.java
+++ 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/ApplicationUtils.java
@@ -24,7 +24,7 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.stratos.autoscaler.applications.payload.BasicPayloadData;
 import org.apache.stratos.autoscaler.applications.payload.PayloadData;
 import org.apache.stratos.autoscaler.applications.payload.PayloadFactory;
-import org.apache.stratos.autoscaler.exception.ApplicationDefinitionException;
+import 
org.apache.stratos.autoscaler.exception.application.ApplicationDefinitionException;
 import org.apache.stratos.cloud.controller.stub.pojo.CartridgeInfo;
 import org.apache.stratos.cloud.controller.stub.pojo.PortMapping;
 import org.apache.stratos.cloud.controller.stub.pojo.Property;

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/dependency/DependencyBuilder.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/dependency/DependencyBuilder.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/dependency/DependencyBuilder.java
index 6b26247..752d947 100644
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/dependency/DependencyBuilder.java
+++ 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/dependency/DependencyBuilder.java
@@ -23,7 +23,7 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.stratos.autoscaler.*;
 import 
org.apache.stratos.autoscaler.applications.dependency.context.ApplicationChildContext;
 import 
org.apache.stratos.autoscaler.applications.dependency.context.ApplicationChildContextFactory;
-import org.apache.stratos.autoscaler.exception.DependencyBuilderException;
+import 
org.apache.stratos.autoscaler.exception.application.DependencyBuilderException;
 import org.apache.stratos.messaging.domain.applications.*;
 
 import java.util.Collection;

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/ApplicationParser.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/ApplicationParser.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/ApplicationParser.java
index 3bf8bb1..e03dcd4 100644
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/ApplicationParser.java
+++ 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/ApplicationParser.java
@@ -21,7 +21,7 @@ package org.apache.stratos.autoscaler.applications.parser;
 
 
 import 
org.apache.stratos.autoscaler.applications.pojo.ApplicationClusterContext;
-import org.apache.stratos.autoscaler.exception.ApplicationDefinitionException;
+import 
org.apache.stratos.autoscaler.exception.application.ApplicationDefinitionException;
 import org.apache.stratos.cloud.controller.stub.pojo.Properties;
 import org.apache.stratos.messaging.domain.applications.Application;
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java
index c24dfe0..8a34b09 100644
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java
+++ 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java
@@ -28,8 +28,8 @@ import 
org.apache.stratos.autoscaler.applications.MTClusterInformation;
 import org.apache.stratos.autoscaler.applications.STClusterInformation;
 import org.apache.stratos.autoscaler.applications.pojo.*;
 import org.apache.stratos.autoscaler.client.CloudControllerClient;
-import org.apache.stratos.autoscaler.exception.ApplicationDefinitionException;
-import org.apache.stratos.autoscaler.exception.CartridgeInformationException;
+import 
org.apache.stratos.autoscaler.exception.application.ApplicationDefinitionException;
+import 
org.apache.stratos.autoscaler.exception.cartridge.CartridgeInformationException;
 import org.apache.stratos.autoscaler.pojo.ServiceGroup;
 import org.apache.stratos.autoscaler.registry.RegistryManager;
 import org.apache.stratos.cloud.controller.stub.pojo.CartridgeInfo;

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/ParserUtils.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/ParserUtils.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/ParserUtils.java
index 162ead7..2b947f0 100644
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/ParserUtils.java
+++ 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/ParserUtils.java
@@ -21,7 +21,7 @@ package org.apache.stratos.autoscaler.applications.parser;
 
 import org.apache.stratos.autoscaler.applications.pojo.GroupContext;
 import org.apache.stratos.autoscaler.applications.pojo.SubscribableContext;
-import org.apache.stratos.autoscaler.exception.ApplicationDefinitionException;
+import 
org.apache.stratos.autoscaler.exception.application.ApplicationDefinitionException;
 import org.apache.stratos.messaging.domain.applications.StartupOrder;
 
 import java.util.*;

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/payload/PayloadFactory.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/payload/PayloadFactory.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/payload/PayloadFactory.java
index 53bac96..02079d9 100755
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/payload/PayloadFactory.java
+++ 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/payload/PayloadFactory.java
@@ -21,7 +21,7 @@ package org.apache.stratos.autoscaler.applications.payload;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.autoscaler.exception.ApplicationDefinitionException;
+import 
org.apache.stratos.autoscaler.exception.application.ApplicationDefinitionException;
 
 
 public class PayloadFactory {

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/topic/ApplicationBuilder.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/topic/ApplicationBuilder.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/topic/ApplicationBuilder.java
index 82c9bb9..d01cd70 100644
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/topic/ApplicationBuilder.java
+++ 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/topic/ApplicationBuilder.java
@@ -24,8 +24,8 @@ import 
org.apache.stratos.autoscaler.context.AutoscalerContext;
 import org.apache.stratos.autoscaler.applications.ApplicationHolder;
 import 
org.apache.stratos.autoscaler.applications.pojo.ApplicationClusterContext;
 import org.apache.stratos.autoscaler.client.CloudControllerClient;
-import org.apache.stratos.autoscaler.monitor.application.ApplicationMonitor;
-import org.apache.stratos.autoscaler.monitor.group.GroupMonitor;
+import org.apache.stratos.autoscaler.monitor.component.ApplicationMonitor;
+import org.apache.stratos.autoscaler.monitor.component.GroupMonitor;
 import org.apache.stratos.messaging.domain.applications.*;
 import org.apache.stratos.messaging.domain.instance.ApplicationInstance;
 import org.apache.stratos.messaging.domain.instance.GroupInstance;

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/CloudControllerClient.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/CloudControllerClient.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/CloudControllerClient.java
index 91c2b27..03a32d0 100644
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/CloudControllerClient.java
+++ 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/CloudControllerClient.java
@@ -25,8 +25,12 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.stratos.autoscaler.Constants;
 import 
org.apache.stratos.autoscaler.applications.pojo.ApplicationClusterContext;
+import 
org.apache.stratos.autoscaler.exception.cartridge.CartridgeInformationException;
+import org.apache.stratos.autoscaler.exception.cartridge.SpawningException;
+import org.apache.stratos.autoscaler.exception.cartridge.TerminationException;
+import 
org.apache.stratos.autoscaler.exception.kubernetes.NonExistingKubernetesGroupException;
+import 
org.apache.stratos.autoscaler.exception.partition.PartitionValidationException;
 import org.apache.stratos.autoscaler.policy.model.DeploymentPolicy;
-import org.apache.stratos.autoscaler.exception.*;
 import org.apache.stratos.autoscaler.kubernetes.KubernetesManager;
 import org.apache.stratos.autoscaler.util.ConfUtil;
 import org.apache.stratos.cloud.controller.stub.*;

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/AutoscalerContext.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/AutoscalerContext.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/AutoscalerContext.java
index 2b41987..fe067f7 100644
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/AutoscalerContext.java
+++ 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/AutoscalerContext.java
@@ -23,7 +23,7 @@ package org.apache.stratos.autoscaler.context;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.stratos.autoscaler.monitor.application.ApplicationMonitor;
+import org.apache.stratos.autoscaler.monitor.component.ApplicationMonitor;
 import org.apache.stratos.autoscaler.monitor.cluster.AbstractClusterMonitor;
 
 /**

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContextFactory.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContextFactory.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContextFactory.java
index fd35f82..1b739fc 100644
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContextFactory.java
+++ 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContextFactory.java
@@ -26,8 +26,8 @@ import 
org.apache.stratos.autoscaler.client.CloudControllerClient;
 import org.apache.stratos.autoscaler.context.member.MemberStatsContext;
 import 
org.apache.stratos.autoscaler.context.partition.network.ClusterLevelNetworkPartitionContext;
 import 
org.apache.stratos.autoscaler.context.partition.ClusterLevelPartitionContext;
-import org.apache.stratos.autoscaler.exception.PartitionValidationException;
-import org.apache.stratos.autoscaler.exception.PolicyValidationException;
+import 
org.apache.stratos.autoscaler.exception.partition.PartitionValidationException;
+import 
org.apache.stratos.autoscaler.exception.policy.PolicyValidationException;
 import org.apache.stratos.autoscaler.partition.PartitionGroup;
 import org.apache.stratos.autoscaler.partition.PartitionManager;
 import org.apache.stratos.autoscaler.policy.PolicyManager;

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java
index b96388c..f6bed25 100644
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java
+++ 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java
@@ -26,12 +26,12 @@ import 
org.apache.stratos.autoscaler.context.cluster.ClusterContextFactory;
 import org.apache.stratos.autoscaler.applications.ApplicationHolder;
 import 
org.apache.stratos.autoscaler.event.publisher.ClusterStatusEventPublisher;
 import 
org.apache.stratos.autoscaler.event.publisher.InstanceNotificationPublisher;
-import org.apache.stratos.autoscaler.exception.DependencyBuilderException;
-import org.apache.stratos.autoscaler.exception.PartitionValidationException;
-import org.apache.stratos.autoscaler.exception.PolicyValidationException;
-import org.apache.stratos.autoscaler.exception.TopologyInConsistentException;
-import org.apache.stratos.autoscaler.monitor.application.ApplicationMonitor;
-import 
org.apache.stratos.autoscaler.monitor.application.ApplicationMonitorFactory;
+import 
org.apache.stratos.autoscaler.exception.application.DependencyBuilderException;
+import 
org.apache.stratos.autoscaler.exception.partition.PartitionValidationException;
+import 
org.apache.stratos.autoscaler.exception.policy.PolicyValidationException;
+import 
org.apache.stratos.autoscaler.exception.application.TopologyInConsistentException;
+import org.apache.stratos.autoscaler.monitor.component.ApplicationMonitor;
+import org.apache.stratos.autoscaler.monitor.MonitorFactory;
 import org.apache.stratos.autoscaler.monitor.cluster.AbstractClusterMonitor;
 import org.apache.stratos.autoscaler.monitor.events.ClusterStatusEvent;
 import org.apache.stratos.autoscaler.util.ServiceReferenceHolder;
@@ -546,7 +546,7 @@ public class AutoscalerTopologyEventReceiver implements 
Runnable {
                                 appId);
                     }
                     try {
-                        applicationMonitor = 
ApplicationMonitorFactory.getApplicationMonitor(appId);
+                        applicationMonitor = 
MonitorFactory.getApplicationMonitor(appId);
                     } catch (PolicyValidationException e) {
                         String msg = "Application monitor creation failed for 
Application: ";
                         log.warn(msg, e);

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/ApplicationDefinitionException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/ApplicationDefinitionException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/ApplicationDefinitionException.java
deleted file mode 100644
index d904e8d..0000000
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/ApplicationDefinitionException.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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.exception;
-
-public class ApplicationDefinitionException extends Exception {
-
-    private String message;
-
-    public ApplicationDefinitionException () {
-        super();
-    }
-
-    public ApplicationDefinitionException (String message, Throwable cause) {
-        super(message, cause);
-        this.message = message;
-    }
-
-    public ApplicationDefinitionException (String message) {
-        super(message);
-        this.message = message;
-    }
-
-    public ApplicationDefinitionException (Throwable cause) {
-        super(cause);
-    }
-
-    public String getMessage() {
-        return message;
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/CartridgeInformationException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/CartridgeInformationException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/CartridgeInformationException.java
deleted file mode 100644
index 53bea79..0000000
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/CartridgeInformationException.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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.exception;
-
-public class CartridgeInformationException extends Exception {
-
-    private String message;
-
-    public CartridgeInformationException () {
-        super();
-    }
-
-    public CartridgeInformationException (String message, Throwable cause) {
-        super(message, cause);
-        this.message = message;
-    }
-
-    public CartridgeInformationException (String message) {
-        super(message);
-        this.message = message;
-    }
-
-    public CartridgeInformationException (Throwable cause) {
-        super(cause);
-    }
-
-    public String getMessage() {
-        return message;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/DependencyBuilderException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/DependencyBuilderException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/DependencyBuilderException.java
deleted file mode 100644
index cb535cc..0000000
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/DependencyBuilderException.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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.exception;
-
-/**
- * This will use to throw any exception when building dependencies
- */
-public class DependencyBuilderException extends Exception {
-
-    private static final long serialVersionUID = -7521673271244696906L;
-    private String message;
-
-    public DependencyBuilderException(String message, Exception exception){
-        super(message, exception);
-        this.message = message;
-    }
-
-
-    public DependencyBuilderException(Exception exception){
-        super(exception);
-    }
-
-    public DependencyBuilderException(String msg){
-        super(msg);
-        this.message = msg;
-    }
-
-    @Override
-    public String getMessage() {
-        return this.message;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidKubernetesGroupException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidKubernetesGroupException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidKubernetesGroupException.java
deleted file mode 100644
index 4613d22..0000000
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidKubernetesGroupException.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *
- * 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.exception;
-
-/**
- * Exception class for handling invalid Kubernetes Group
- */
-public class InvalidKubernetesGroupException extends Exception {
-
-    private String message;
-
-    public InvalidKubernetesGroupException(String message, Exception 
exception){
-        super(message, exception);
-        this.message = message;
-    }
-
-    public InvalidKubernetesGroupException(Exception exception){
-        super(exception);
-    }
-
-    public InvalidKubernetesGroupException(String msg){
-        super(msg);
-        this.message = msg;
-    }
-
-    @Override
-    public String getMessage() {
-        return this.message;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidKubernetesHostException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidKubernetesHostException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidKubernetesHostException.java
deleted file mode 100644
index 461ec26..0000000
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidKubernetesHostException.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *
- * 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.exception;
-
-/**
- * Exception class for handling invalid Kubernetes Host
- */
-public class InvalidKubernetesHostException extends Exception {
-
-    private String message;
-
-    public InvalidKubernetesHostException(String message, Exception exception){
-        super(message, exception);
-        this.message = message;
-    }
-
-    public InvalidKubernetesHostException(Exception exception){
-        super(exception);
-    }
-
-    public InvalidKubernetesHostException(String msg){
-        super(msg);
-        this.message = msg;
-    }
-
-    @Override
-    public String getMessage() {
-        return this.message;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidKubernetesMasterException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidKubernetesMasterException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidKubernetesMasterException.java
deleted file mode 100644
index 341e03d..0000000
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidKubernetesMasterException.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.apache.stratos.autoscaler.exception;
-
-/**
- * Exception class for handling invalid Kubernetes Master
- */
-public class InvalidKubernetesMasterException extends Exception {
-    private String message;
-
-    public InvalidKubernetesMasterException(String message, Exception 
exception){
-        super(message, exception);
-        this.message = message;
-    }
-
-    public InvalidKubernetesMasterException(Exception exception){
-        super(exception);
-    }
-
-    public InvalidKubernetesMasterException(String msg){
-        super(msg);
-        this.message = msg;
-    }
-
-    @Override
-    public String getMessage() {
-        return this.message;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidPartitionException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidPartitionException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidPartitionException.java
deleted file mode 100644
index f4b7ce4..0000000
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidPartitionException.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.apache.stratos.autoscaler.exception;
-/*
- *
- * 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.
- *
-*/
-
-
-/**
- *
- */
-public class InvalidPartitionException extends Exception {
-
-    private static final long serialVersionUID = -7521673271244696906L;
-    private String message;
-
-    public InvalidPartitionException(String message, Exception exception){
-        super(message, exception);
-        this.message = message;
-    }
-
-
-    public InvalidPartitionException(Exception exception){
-        super(exception);
-    }
-    
-    public InvalidPartitionException(String msg){
-        super(msg);
-        this.message = msg;
-    }
-    
-    @Override
-    public String getMessage() {
-        return this.message;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidPolicyException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidPolicyException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidPolicyException.java
deleted file mode 100644
index d0f2814..0000000
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidPolicyException.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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.exception;
-
-public class InvalidPolicyException extends Exception {
-
-       private static final long serialVersionUID = -4914522749282514366L;
-       private String message;
-       
-       public InvalidPolicyException(String message) {
-               super(message);
-               this.message = message;
-       }
-       
-       public InvalidPolicyException(String message,Throwable e) {
-               super(message,e);
-               this.message = message;
-       }
-       
-       public InvalidPolicyException(Throwable e) {
-               super(e);
-       }
-       
-       @Override
-       public String getMessage() {
-               return message;
-       }
-       
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidServiceGroupException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidServiceGroupException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidServiceGroupException.java
deleted file mode 100644
index d18c274..0000000
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidServiceGroupException.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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.exception;
-
-public class InvalidServiceGroupException extends Exception {
-
-
-    private static final long serialVersionUID = 2651280146514042590L;
-
-    private String message;
-
-    public InvalidServiceGroupException(String msg) {
-        super(msg);
-        this.setMessage(msg);
-    }
-
-    public InvalidServiceGroupException(String msg, Exception ex) {
-        super(msg, ex);
-        this.setMessage(msg);
-    }
-
-    public String getMessage() {
-        return message;
-    }
-
-    public void setMessage(String message) {
-        this.message = message;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/KubernetesEndpointValidationException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/KubernetesEndpointValidationException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/KubernetesEndpointValidationException.java
deleted file mode 100644
index f53bdef..0000000
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/KubernetesEndpointValidationException.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- *
- * 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.exception;
-
-/**
- * Exception class for handling Kubernetes endpoint validation
- */
-public class KubernetesEndpointValidationException extends Exception {
-    private String message;
-
-    public KubernetesEndpointValidationException(String message, Exception 
exception){
-        super(message, exception);
-        this.setMessage(message);
-    }
-
-    public KubernetesEndpointValidationException(String msg) {
-        super(msg);
-        this.message = msg;
-    }
-    public KubernetesEndpointValidationException(Exception exception){
-        super(exception);
-    }
-
-
-    public String getMessage() {
-        return message;
-    }
-
-
-    public void setMessage(String message) {
-        this.message = message;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/NonExistingKubernetesGroupException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/NonExistingKubernetesGroupException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/NonExistingKubernetesGroupException.java
deleted file mode 100644
index 0024911..0000000
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/NonExistingKubernetesGroupException.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *
- * 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.exception;
-
-/**
- * Exception class for handling non-existing Kubernetes Group
- */
-public class NonExistingKubernetesGroupException extends Exception {
-
-    private String message;
-
-    public NonExistingKubernetesGroupException(String message, Exception 
exception){
-        super(message, exception);
-        this.message = message;
-    }
-
-    public NonExistingKubernetesGroupException(Exception exception){
-        super(exception);
-    }
-
-    public NonExistingKubernetesGroupException(String msg){
-        super(msg);
-        this.message = msg;
-    }
-
-    @Override
-    public String getMessage() {
-        return this.message;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/NonExistingKubernetesHostException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/NonExistingKubernetesHostException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/NonExistingKubernetesHostException.java
deleted file mode 100644
index 283631c..0000000
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/NonExistingKubernetesHostException.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *
- * 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.exception;
-
-/**
- * Exception class for handling non-existing Kubernetes Host
- */
-public class NonExistingKubernetesHostException extends Exception {
-    private String message;
-
-    public NonExistingKubernetesHostException(String message, Exception 
exception){
-        super(message, exception);
-        this.message = message;
-    }
-
-    public NonExistingKubernetesHostException(Exception exception){
-        super(exception);
-    }
-
-    public NonExistingKubernetesHostException(String msg){
-        super(msg);
-        this.message = msg;
-    }
-
-    @Override
-    public String getMessage() {
-        return this.message;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/NonExistingKubernetesMasterException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/NonExistingKubernetesMasterException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/NonExistingKubernetesMasterException.java
deleted file mode 100644
index 2e9a666..0000000
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/NonExistingKubernetesMasterException.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *
- * 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.exception;
-
-/**
- * Exception class for handling non-existing Kubernetes Master
- */
-public class NonExistingKubernetesMasterException extends Exception {
-    private String message;
-
-    public NonExistingKubernetesMasterException(String message, Exception 
exception){
-        super(message, exception);
-        this.message = message;
-    }
-
-    public NonExistingKubernetesMasterException(Exception exception){
-        super(exception);
-    }
-
-    public NonExistingKubernetesMasterException(String msg){
-        super(msg);
-        this.message = msg;
-    }
-
-    @Override
-    public String getMessage() {
-        return this.message;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/NonExistingLBException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/NonExistingLBException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/NonExistingLBException.java
deleted file mode 100644
index 159c52b..0000000
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/NonExistingLBException.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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.exception;
-
-public class NonExistingLBException extends Exception {
-
-    private static final long serialVersionUID = -9163807860189126883L;
-    private String message;
-    
-    public NonExistingLBException(final String message, final Exception 
exception) {
-
-        super(message, exception);
-        this.setMessage(message);
-
-    }
-
-    public NonExistingLBException(final Exception exception) {
-
-        super(exception);
-
-    }
-
-    public NonExistingLBException(final String msg) {
-
-        super(msg);
-        this.setMessage(msg);
-
-    }
-
-       public String getMessage() {
-               return message;
-       }
-
-       public void setMessage(String message) {
-               this.message = message;
-       }
-
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/ParentMonitorNotFoundException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/ParentMonitorNotFoundException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/ParentMonitorNotFoundException.java
deleted file mode 100644
index d22dbaa..0000000
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/ParentMonitorNotFoundException.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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.exception;
-
-/**
- * This will throw when required monitor not found
- */
-public class ParentMonitorNotFoundException extends Exception{
-    private static final long serialVersionUID = -9163807860189126883L;
-    private String message;
-
-    public ParentMonitorNotFoundException(final String message, final 
Exception exception) {
-
-        super(message, exception);
-        this.setMessage(message);
-
-    }
-
-    public ParentMonitorNotFoundException(final Exception exception) {
-
-        super(exception);
-
-    }
-
-    public ParentMonitorNotFoundException(final String msg) {
-
-        super(msg);
-        this.setMessage(msg);
-
-    }
-
-    public String getMessage() {
-        return message;
-    }
-
-    public void setMessage(String message) {
-        this.message = message;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/PartitionValidationException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/PartitionValidationException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/PartitionValidationException.java
deleted file mode 100644
index 0a5789e..0000000
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/PartitionValidationException.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package org.apache.stratos.autoscaler.exception;
-/*
- *
- * 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.
- *
-*/
-
-
-/**
- *
- */
-public class PartitionValidationException extends Exception {
-
-       private static final long serialVersionUID = -3904452358279522141L;
-       private String message;
-
-       public PartitionValidationException(String message, Exception 
exception){
-        super(message, exception);
-        this.setMessage(message);
-    }
-
-       public PartitionValidationException(String msg) {
-               super(msg);
-               this.message = msg;
-       }
-    public PartitionValidationException(Exception exception){
-        super(exception);
-    }
-
-
-       public String getMessage() {
-               return message;
-       }
-
-
-       public void setMessage(String message) {
-               this.message = message;
-       }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/PolicyValidationException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/PolicyValidationException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/PolicyValidationException.java
deleted file mode 100644
index eb236cc..0000000
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/PolicyValidationException.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package org.apache.stratos.autoscaler.exception;
-/*
- *
- * 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.
- *
-*/
-
-
-/**
- *
- */
-public class PolicyValidationException extends Exception {
-
-    private static final long serialVersionUID = -7423800138697480115L;
-    private String message;
-
-    public PolicyValidationException(String message, Exception exception){
-        super(message, exception);
-        this.setMessage(message);
-    }
-
-
-    public PolicyValidationException(Exception exception){
-        super(exception);
-    }
-    
-    public PolicyValidationException(String msg){
-        super(msg);
-        this.setMessage(msg);
-    }
-
-
-       public String getMessage() {
-               return message;
-       }
-
-
-       public void setMessage(String message) {
-               this.message = message;
-       }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/SpawningException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/SpawningException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/SpawningException.java
deleted file mode 100644
index 4b6e62f..0000000
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/SpawningException.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.apache.stratos.autoscaler.exception;
-/*
- *
- * 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.
- *
-*/
-
-
-/**
- *
- */
-public class SpawningException extends Exception {
-
-    private static final long serialVersionUID = 4761501174753405374L;
-    private String message;
-
-    public SpawningException(String message, Exception exception){
-        super(message, exception);
-        this.setMessage(message);
-    }
-
-
-    public SpawningException(Exception exception){
-        super(exception);
-    }
-
-
-       public String getMessage() {
-               return message;
-       }
-
-
-       public void setMessage(String message) {
-               this.message = message;
-       }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/TerminationException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/TerminationException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/TerminationException.java
deleted file mode 100644
index 720c186..0000000
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/TerminationException.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.apache.stratos.autoscaler.exception;
-/*
- *
- * 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.
- *
-*/
-
-
-public class TerminationException extends Throwable {
-
-       private static final long serialVersionUID = -6038793010380236971L;
-       private String message;
-       
-       public TerminationException(String s, Exception e) {
-        super(s, e);
-        this.setMessage(s);
-    }
-    
-    public TerminationException(Exception e) {
-        super(e);
-    }
-
-       public String getMessage() {
-               return message;
-       }
-
-       public void setMessage(String message) {
-               this.message = message;
-       }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/TopologyInConsistentException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/TopologyInConsistentException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/TopologyInConsistentException.java
deleted file mode 100644
index ab2d32d..0000000
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/TopologyInConsistentException.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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.exception;
-
-/**
- * This will use to throw when Topology in consistency found.
- */
-public class TopologyInConsistentException extends Exception {
-    private static final long serialVersionUID = -7521673271244696906L;
-    private String message;
-
-    public TopologyInConsistentException(String message, Exception exception){
-        super(message, exception);
-        this.message = message;
-    }
-
-
-    public TopologyInConsistentException(Exception exception){
-        super(exception);
-    }
-
-    public TopologyInConsistentException(String msg){
-        super(msg);
-        this.message = msg;
-    }
-
-    @Override
-    public String getMessage() {
-        return this.message;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/application/ApplicationDefinitionException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/application/ApplicationDefinitionException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/application/ApplicationDefinitionException.java
new file mode 100644
index 0000000..771c10c
--- /dev/null
+++ 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/application/ApplicationDefinitionException.java
@@ -0,0 +1,48 @@
+/*
+ * 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.exception.application;
+
+public class ApplicationDefinitionException extends Exception {
+
+    private String message;
+
+    public ApplicationDefinitionException () {
+        super();
+    }
+
+    public ApplicationDefinitionException (String message, Throwable cause) {
+        super(message, cause);
+        this.message = message;
+    }
+
+    public ApplicationDefinitionException (String message) {
+        super(message);
+        this.message = message;
+    }
+
+    public ApplicationDefinitionException (Throwable cause) {
+        super(cause);
+    }
+
+    public String getMessage() {
+        return message;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/application/DependencyBuilderException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/application/DependencyBuilderException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/application/DependencyBuilderException.java
new file mode 100644
index 0000000..c6daaca
--- /dev/null
+++ 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/application/DependencyBuilderException.java
@@ -0,0 +1,48 @@
+/*
+ * 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.exception.application;
+
+/**
+ * This will use to throw any exception when building dependencies
+ */
+public class DependencyBuilderException extends Exception {
+
+    private static final long serialVersionUID = -7521673271244696906L;
+    private String message;
+
+    public DependencyBuilderException(String message, Exception exception){
+        super(message, exception);
+        this.message = message;
+    }
+
+
+    public DependencyBuilderException(Exception exception){
+        super(exception);
+    }
+
+    public DependencyBuilderException(String msg){
+        super(msg);
+        this.message = msg;
+    }
+
+    @Override
+    public String getMessage() {
+        return this.message;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/application/ParentMonitorNotFoundException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/application/ParentMonitorNotFoundException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/application/ParentMonitorNotFoundException.java
new file mode 100644
index 0000000..e5e00cd
--- /dev/null
+++ 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/application/ParentMonitorNotFoundException.java
@@ -0,0 +1,56 @@
+/*
+ * 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.exception.application;
+
+/**
+ * This will throw when required monitor not found
+ */
+public class ParentMonitorNotFoundException extends Exception{
+    private static final long serialVersionUID = -9163807860189126883L;
+    private String message;
+
+    public ParentMonitorNotFoundException(final String message, final 
Exception exception) {
+
+        super(message, exception);
+        this.setMessage(message);
+
+    }
+
+    public ParentMonitorNotFoundException(final Exception exception) {
+
+        super(exception);
+
+    }
+
+    public ParentMonitorNotFoundException(final String msg) {
+
+        super(msg);
+        this.setMessage(msg);
+
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/application/TopologyInConsistentException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/application/TopologyInConsistentException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/application/TopologyInConsistentException.java
new file mode 100644
index 0000000..41dc15f
--- /dev/null
+++ 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/application/TopologyInConsistentException.java
@@ -0,0 +1,47 @@
+/*
+ * 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.exception.application;
+
+/**
+ * This will use to throw when Topology in consistency found.
+ */
+public class TopologyInConsistentException extends Exception {
+    private static final long serialVersionUID = -7521673271244696906L;
+    private String message;
+
+    public TopologyInConsistentException(String message, Exception exception){
+        super(message, exception);
+        this.message = message;
+    }
+
+
+    public TopologyInConsistentException(Exception exception){
+        super(exception);
+    }
+
+    public TopologyInConsistentException(String msg){
+        super(msg);
+        this.message = msg;
+    }
+
+    @Override
+    public String getMessage() {
+        return this.message;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/cartridge/CartridgeInformationException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/cartridge/CartridgeInformationException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/cartridge/CartridgeInformationException.java
new file mode 100644
index 0000000..c99163d
--- /dev/null
+++ 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/cartridge/CartridgeInformationException.java
@@ -0,0 +1,47 @@
+/*
+ * 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.exception.cartridge;
+
+public class CartridgeInformationException extends Exception {
+
+    private String message;
+
+    public CartridgeInformationException () {
+        super();
+    }
+
+    public CartridgeInformationException (String message, Throwable cause) {
+        super(message, cause);
+        this.message = message;
+    }
+
+    public CartridgeInformationException (String message) {
+        super(message);
+        this.message = message;
+    }
+
+    public CartridgeInformationException (Throwable cause) {
+        super(cause);
+    }
+
+    public String getMessage() {
+        return message;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/cartridge/NonExistingLBException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/cartridge/NonExistingLBException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/cartridge/NonExistingLBException.java
new file mode 100644
index 0000000..d571e09
--- /dev/null
+++ 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/cartridge/NonExistingLBException.java
@@ -0,0 +1,54 @@
+/*
+ * 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.exception.cartridge;
+
+public class NonExistingLBException extends Exception {
+
+    private static final long serialVersionUID = -9163807860189126883L;
+    private String message;
+    
+    public NonExistingLBException(final String message, final Exception 
exception) {
+
+        super(message, exception);
+        this.setMessage(message);
+
+    }
+
+    public NonExistingLBException(final Exception exception) {
+
+        super(exception);
+
+    }
+
+    public NonExistingLBException(final String msg) {
+
+        super(msg);
+        this.setMessage(msg);
+
+    }
+
+       public String getMessage() {
+               return message;
+       }
+
+       public void setMessage(String message) {
+               this.message = message;
+       }
+
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/cartridge/SpawningException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/cartridge/SpawningException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/cartridge/SpawningException.java
new file mode 100644
index 0000000..e3ad0fc
--- /dev/null
+++ 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/cartridge/SpawningException.java
@@ -0,0 +1,51 @@
+package org.apache.stratos.autoscaler.exception.cartridge;
+/*
+ *
+ * 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.
+ *
+*/
+
+
+/**
+ *
+ */
+public class SpawningException extends Exception {
+
+    private static final long serialVersionUID = 4761501174753405374L;
+    private String message;
+
+    public SpawningException(String message, Exception exception){
+        super(message, exception);
+        this.setMessage(message);
+    }
+
+
+    public SpawningException(Exception exception){
+        super(exception);
+    }
+
+
+       public String getMessage() {
+               return message;
+       }
+
+
+       public void setMessage(String message) {
+               this.message = message;
+       }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e9902546/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/cartridge/TerminationException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/cartridge/TerminationException.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/cartridge/TerminationException.java
new file mode 100644
index 0000000..cfb9501
--- /dev/null
+++ 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/cartridge/TerminationException.java
@@ -0,0 +1,45 @@
+package org.apache.stratos.autoscaler.exception.cartridge;
+/*
+ *
+ * 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.
+ *
+*/
+
+
+public class TerminationException extends Throwable {
+
+       private static final long serialVersionUID = -6038793010380236971L;
+       private String message;
+       
+       public TerminationException(String s, Exception e) {
+        super(s, e);
+        this.setMessage(s);
+    }
+    
+    public TerminationException(Exception e) {
+        super(e);
+    }
+
+       public String getMessage() {
+               return message;
+       }
+
+       public void setMessage(String message) {
+               this.message = message;
+       }
+}

Reply via email to