You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ud...@apache.org on 2014/10/27 06:31:00 UTC

[1/3] rename application status events, listeners and processors with prefix appstatus

Repository: stratos
Updated Branches:
  refs/heads/4.0.0-grouping 4f59f4b8b -> 4e4ba5b38


http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusMessageProcessorChain.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusMessageProcessorChain.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusMessageProcessorChain.java
new file mode 100644
index 0000000..14b8bc2
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusMessageProcessorChain.java
@@ -0,0 +1,126 @@
+/*
+ * 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.messaging.message.processor.application.status;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.messaging.listener.EventListener;
+import org.apache.stratos.messaging.listener.application.status.*;
+import org.apache.stratos.messaging.message.processor.MessageProcessorChain;
+
+/**
+ * Application Status processor chain is to handle the list processors to parse the application
+ * status.
+ */
+public class AppStatusMessageProcessorChain extends MessageProcessorChain {
+    private static final Log log = LogFactory.getLog(AppStatusMessageProcessorChain.class);
+
+    private AppStatusClusterActivatedMessageProcessor clusterActivatedMessageProcessor;
+    private AppStatusClusterInactivateMessageProcessor clusterInActivateMessageProcessor;
+    private AppStatusClusterTerminatingMessageProcessor clusterTerminatingMessageProcessor;
+    private AppStatusClusterTerminatedMessageProcessor clusterTerminatedMessageProcessor;
+    private AppStatusGroupActivatedMessageProcessor groupActivatedMessageProcessor;
+    private AppStatusGroupInactivatedMessageProcessor groupInActivateMessageProcessor;
+    private AppStatusApplicationActivatedMessageProcessor appActivatedMessageProcessor;
+    private AppStatusApplicationCreatedMessageProcessor applicationStatusAppCreatedMessageProcessor;
+    private AppStatusApplicationInactivatedMessageProcessor applicationStatusAppInActivatedMessageProcessor;
+    private AppStatusApplicationTerminatedMessageProcessor applicationStatusAppTerminatedMessageProcessor;
+    private AppStatusApplicationTerminatingMessageProcessor applicationStatusAppTerminatingMessageProcessor;
+
+    private AppStatusGroupTerminatedMessageProcessor groupTerminatedMessageProcessor;
+    private AppStatusGroupTerminatingMessageProcessor groupTerminatingMessageProcessor;
+
+    public void initialize() {
+        // Add instance notifier event processors
+        clusterActivatedMessageProcessor = new AppStatusClusterActivatedMessageProcessor();
+        add(clusterActivatedMessageProcessor);
+
+        clusterInActivateMessageProcessor = new AppStatusClusterInactivateMessageProcessor();
+        add(clusterInActivateMessageProcessor);
+
+        clusterTerminatingMessageProcessor = new AppStatusClusterTerminatingMessageProcessor();
+        add(clusterTerminatingMessageProcessor);
+        clusterTerminatedMessageProcessor = new AppStatusClusterTerminatedMessageProcessor();
+        add(clusterTerminatedMessageProcessor);
+
+        groupActivatedMessageProcessor = new AppStatusGroupActivatedMessageProcessor();
+        add(groupActivatedMessageProcessor);
+
+        groupInActivateMessageProcessor = new AppStatusGroupInactivatedMessageProcessor();
+        add(groupInActivateMessageProcessor);
+
+        appActivatedMessageProcessor = new AppStatusApplicationActivatedMessageProcessor();
+        add(appActivatedMessageProcessor);
+
+        applicationStatusAppCreatedMessageProcessor = new AppStatusApplicationCreatedMessageProcessor();
+        this.add(applicationStatusAppCreatedMessageProcessor);
+
+        applicationStatusAppInActivatedMessageProcessor = new AppStatusApplicationInactivatedMessageProcessor();
+        this.add(applicationStatusAppInActivatedMessageProcessor);
+
+        applicationStatusAppTerminatedMessageProcessor = new AppStatusApplicationTerminatedMessageProcessor();
+        this.add(applicationStatusAppTerminatedMessageProcessor);
+
+        applicationStatusAppTerminatingMessageProcessor = new AppStatusApplicationTerminatingMessageProcessor();
+        this.add(applicationStatusAppTerminatingMessageProcessor);
+
+        groupTerminatedMessageProcessor = new AppStatusGroupTerminatedMessageProcessor();
+        this.add(groupTerminatedMessageProcessor);
+
+        groupTerminatingMessageProcessor = new AppStatusGroupTerminatingMessageProcessor();
+        this.add(groupTerminatingMessageProcessor);
+
+        if (log.isDebugEnabled()) {
+            log.debug("Instance notifier message processor chain initialized");
+        }
+    }
+
+    public void addEventListener(EventListener eventListener) {
+        if (eventListener instanceof AppStatusClusterActivatedEventListener) {
+            clusterActivatedMessageProcessor.addEventListener(eventListener);
+        } else if (eventListener instanceof AppStatusClusterInactivateEventListener) {
+            clusterInActivateMessageProcessor.addEventListener(eventListener);
+        } else if (eventListener instanceof AppStatusGroupActivatedEventListener) {
+            groupActivatedMessageProcessor.addEventListener(eventListener);
+        } else if(eventListener instanceof AppStatusClusterTerminatedEventListener){
+            clusterTerminatedMessageProcessor.addEventListener(eventListener);
+        } else if(eventListener instanceof AppStatusClusterTerminatingEventListener){
+            clusterTerminatingMessageProcessor.addEventListener(eventListener);
+        }else if (eventListener instanceof AppStatusGroupInactivateEventListener) {
+            groupInActivateMessageProcessor.addEventListener(eventListener);
+        } else if (eventListener instanceof AppStatusApplicationActivatedEventListener) {
+            appActivatedMessageProcessor.addEventListener(eventListener);
+        } else if(eventListener instanceof AppStatusApplicationInactivatedEventListener){
+            applicationStatusAppInActivatedMessageProcessor.addEventListener(eventListener);
+        } else if(eventListener instanceof AppStatusApplicationCreatedEventListener){
+            applicationStatusAppCreatedMessageProcessor.addEventListener(eventListener);
+        } else if(eventListener instanceof AppStatusApplicationTerminatingEventListener){
+            applicationStatusAppTerminatingMessageProcessor.addEventListener(eventListener);
+        } else if(eventListener instanceof AppStatusApplicationTerminatedEventListener){
+            applicationStatusAppTerminatedMessageProcessor.addEventListener(eventListener);
+        } else if (eventListener instanceof AppStatusGroupTerminatingEventListener){
+            groupTerminatingMessageProcessor.addEventListener(eventListener);
+        } else if (eventListener instanceof AppStatusGroupTerminatedEventListener){
+            groupTerminatedMessageProcessor.addEventListener(eventListener);
+        } else
+        {
+            throw new RuntimeException("Unknown event listener " + eventListener.toString());
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusAppActivatedMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusAppActivatedMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusAppActivatedMessageProcessor.java
deleted file mode 100644
index 1a46cdf..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusAppActivatedMessageProcessor.java
+++ /dev/null
@@ -1,67 +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.messaging.message.processor.application.status;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.messaging.event.application.status.ApplicationActivatedEvent;
-import org.apache.stratos.messaging.event.application.status.ClusterActivatedEvent;
-import org.apache.stratos.messaging.event.application.status.GroupActivatedEvent;
-import org.apache.stratos.messaging.message.processor.MessageProcessor;
-import org.apache.stratos.messaging.util.Util;
-
-/**
- * Created by reka on 9/25/14.
- */
-public class ApplicationStatusAppActivatedMessageProcessor extends MessageProcessor {
-    private static final Log log =
-            LogFactory.getLog(ApplicationStatusAppActivatedMessageProcessor.class);
-
-
-    private MessageProcessor nextProcessor;
-    @Override
-    public void setNext(MessageProcessor nextProcessor) {
-        this.nextProcessor = nextProcessor;
-
-    }
-
-    @Override
-    public boolean process(String type, String message, Object object) {
-        if (ApplicationActivatedEvent.class.getName().equals(type)) {
-            // Parse complete message and build event
-            ApplicationActivatedEvent event =
-                    (ApplicationActivatedEvent) Util.jsonToObject(message, ApplicationActivatedEvent.class);
-
-            if (log.isDebugEnabled()) {
-                log.debug("Received ApplicationActivatedEvent in application status topic: " + event.toString());
-            }
-            // Notify event listeners
-            notifyEventListeners(event);
-            return true;
-        } else {
-            if (nextProcessor != null) {
-                return nextProcessor.process(type, message, object);
-            } else {
-                throw new RuntimeException(
-                        String.format("Failed to process group activated message " +
-                                "using available message processors: [type] %s [body] %s", type, message));
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusAppCreatedMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusAppCreatedMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusAppCreatedMessageProcessor.java
deleted file mode 100644
index 66448ac..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusAppCreatedMessageProcessor.java
+++ /dev/null
@@ -1,63 +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.messaging.message.processor.application.status;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.messaging.event.topology.ApplicationCreatedEvent;
-import org.apache.stratos.messaging.message.processor.MessageProcessor;
-import org.apache.stratos.messaging.util.Util;
-
-public class ApplicationStatusAppCreatedMessageProcessor extends MessageProcessor {
-    private static final Log log =
-            LogFactory.getLog(ApplicationStatusAppCreatedMessageProcessor.class);
-
-
-    private MessageProcessor nextProcessor;
-
-    @Override
-    public void setNext(MessageProcessor nextProcessor) {
-        this.nextProcessor = nextProcessor;
-
-    }
-
-    @Override
-    public boolean process(String type, String message, Object object) {
-        if (ApplicationCreatedEvent.class.getName().equals(type)) {
-            // Parse complete message and build event
-            ApplicationCreatedEvent event =
-                    (ApplicationCreatedEvent) Util.jsonToObject(message, ApplicationCreatedEvent.class);
-
-            if (log.isDebugEnabled()) {
-                log.debug("Received ApplicationCreated Event in application status topic: " + event.toString());
-            }
-            // Notify event listeners
-            notifyEventListeners(event);
-            return true;
-        } else {
-            if (nextProcessor != null) {
-                return nextProcessor.process(type, message, object);
-            } else {
-                throw new RuntimeException(
-                        String.format("Failed to process group activated message " +
-                                "using available message processors: [type] %s [body] %s", type, message));
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusAppInActivatedMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusAppInActivatedMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusAppInActivatedMessageProcessor.java
deleted file mode 100644
index 20e0e12..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusAppInActivatedMessageProcessor.java
+++ /dev/null
@@ -1,63 +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.messaging.message.processor.application.status;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.messaging.event.application.status.ApplicationInactivatedEvent;
-import org.apache.stratos.messaging.message.processor.MessageProcessor;
-import org.apache.stratos.messaging.util.Util;
-
-public class ApplicationStatusAppInActivatedMessageProcessor extends MessageProcessor {
-    private static final Log log =
-            LogFactory.getLog(ApplicationStatusAppInActivatedMessageProcessor.class);
-
-
-    private MessageProcessor nextProcessor;
-
-    @Override
-    public void setNext(MessageProcessor nextProcessor) {
-        this.nextProcessor = nextProcessor;
-
-    }
-
-    @Override
-    public boolean process(String type, String message, Object object) {
-        if (ApplicationInactivatedEvent.class.getName().equals(type)) {
-            // Parse complete message and build event
-            ApplicationInactivatedEvent event =
-                    (ApplicationInactivatedEvent) Util.jsonToObject(message, ApplicationInactivatedEvent.class);
-
-            if (log.isDebugEnabled()) {
-                log.debug("Received ApplicationInActivatedEvent in application status topic: " + event.toString());
-            }
-            // Notify event listeners
-            notifyEventListeners(event);
-            return true;
-        } else {
-            if (nextProcessor != null) {
-                return nextProcessor.process(type, message, object);
-            } else {
-                throw new RuntimeException(
-                        String.format("Failed to process group activated message " +
-                                "using available message processors: [type] %s [body] %s", type, message));
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusAppTerminatedMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusAppTerminatedMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusAppTerminatedMessageProcessor.java
deleted file mode 100644
index ad5565a..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusAppTerminatedMessageProcessor.java
+++ /dev/null
@@ -1,63 +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.messaging.message.processor.application.status;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.messaging.event.application.status.ApplicationTerminatedEvent;
-import org.apache.stratos.messaging.message.processor.MessageProcessor;
-import org.apache.stratos.messaging.util.Util;
-
-public class ApplicationStatusAppTerminatedMessageProcessor extends MessageProcessor {
-    private static final Log log =
-            LogFactory.getLog(ApplicationStatusAppTerminatedMessageProcessor.class);
-
-
-    private MessageProcessor nextProcessor;
-
-    @Override
-    public void setNext(MessageProcessor nextProcessor) {
-        this.nextProcessor = nextProcessor;
-
-    }
-
-    @Override
-    public boolean process(String type, String message, Object object) {
-        if (ApplicationTerminatedEvent.class.getName().equals(type)) {
-            // Parse complete message and build event
-            ApplicationTerminatedEvent event =
-                    (ApplicationTerminatedEvent) Util.jsonToObject(message, ApplicationTerminatedEvent.class);
-
-            if (log.isDebugEnabled()) {
-                log.debug("Received ApplicationTerminatedEvent in application status topic: " + event.toString());
-            }
-            // Notify event listeners
-            notifyEventListeners(event);
-            return true;
-        } else {
-            if (nextProcessor != null) {
-                return nextProcessor.process(type, message, object);
-            } else {
-                throw new RuntimeException(
-                        String.format("Failed to process group activated message " +
-                                "using available message processors: [type] %s [body] %s", type, message));
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusAppTerminatingMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusAppTerminatingMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusAppTerminatingMessageProcessor.java
deleted file mode 100644
index 2ace24b..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusAppTerminatingMessageProcessor.java
+++ /dev/null
@@ -1,63 +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.messaging.message.processor.application.status;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.messaging.event.application.status.ApplicationTerminatingEvent;
-import org.apache.stratos.messaging.message.processor.MessageProcessor;
-import org.apache.stratos.messaging.util.Util;
-
-public class ApplicationStatusAppTerminatingMessageProcessor extends MessageProcessor {
-    private static final Log log =
-            LogFactory.getLog(ApplicationStatusAppTerminatingMessageProcessor.class);
-
-
-    private MessageProcessor nextProcessor;
-
-    @Override
-    public void setNext(MessageProcessor nextProcessor) {
-        this.nextProcessor = nextProcessor;
-
-    }
-
-    @Override
-    public boolean process(String type, String message, Object object) {
-        if (ApplicationTerminatingEvent.class.getName().equals(type)) {
-            // Parse complete message and build event
-            ApplicationTerminatingEvent event =
-                    (ApplicationTerminatingEvent) Util.jsonToObject(message, ApplicationTerminatingEvent.class);
-
-            if (log.isDebugEnabled()) {
-                log.debug("Received ApplicationTerminatingEvent in application status topic: " + event.toString());
-            }
-            // Notify event listeners
-            notifyEventListeners(event);
-            return true;
-        } else {
-            if (nextProcessor != null) {
-                return nextProcessor.process(type, message, object);
-            } else {
-                throw new RuntimeException(
-                        String.format("Failed to process group activated message " +
-                                "using available message processors: [type] %s [body] %s", type, message));
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusClusterActivatedMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusClusterActivatedMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusClusterActivatedMessageProcessor.java
deleted file mode 100644
index 249a6da..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusClusterActivatedMessageProcessor.java
+++ /dev/null
@@ -1,57 +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.messaging.message.processor.application.status;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.messaging.event.application.status.ClusterActivatedEvent;
-import org.apache.stratos.messaging.message.processor.MessageProcessor;
-import org.apache.stratos.messaging.util.Util;
-
-
-public class ApplicationStatusClusterActivatedMessageProcessor extends MessageProcessor {
-    private static final Log log = LogFactory.getLog(ApplicationStatusClusterActivatedMessageProcessor.class);
-    private MessageProcessor nextProcessor;
-
-    @Override
-    public void setNext(MessageProcessor nextProcessor) {
-        this.nextProcessor = nextProcessor;
-    }
-
-    @Override
-    public boolean process(String type, String message, Object object) {
-        if (ClusterActivatedEvent.class.getName().equals(type)) {
-            // Parse complete message and build event
-            ClusterActivatedEvent event = (ClusterActivatedEvent) Util.jsonToObject(message, ClusterActivatedEvent.class);
-
-            if(log.isDebugEnabled()) {
-                log.debug("Received ClusterActivatedEvent: " + event.toString());
-            }
-            // Notify event listeners
-            notifyEventListeners(event);
-            return true;
-        } else {
-            if (nextProcessor != null) {
-                return nextProcessor.process(type, message, object);
-            } else {
-                throw new RuntimeException(String.format("Failed to process cluster activated message using available message processors: [type] %s [body] %s", type, message));
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusClusterInActivateMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusClusterInActivateMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusClusterInActivateMessageProcessor.java
deleted file mode 100644
index 4e2fe7c..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusClusterInActivateMessageProcessor.java
+++ /dev/null
@@ -1,59 +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.messaging.message.processor.application.status;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.messaging.event.application.status.ClusterActivatedEvent;
-import org.apache.stratos.messaging.event.application.status.ClusterInActivateEvent;
-import org.apache.stratos.messaging.message.processor.MessageProcessor;
-import org.apache.stratos.messaging.util.Util;
-
-
-public class ApplicationStatusClusterInActivateMessageProcessor extends MessageProcessor {
-    private static final Log log = LogFactory.getLog(ApplicationStatusClusterInActivateMessageProcessor.class);
-    private MessageProcessor nextProcessor;
-
-    @Override
-    public void setNext(MessageProcessor nextProcessor) {
-        this.nextProcessor = nextProcessor;
-    }
-
-    @Override
-    public boolean process(String type, String message, Object object) {
-        if (ClusterInActivateEvent.class.getName().equals(type)) {
-            // Parse complete message and build event
-            ClusterInActivateEvent event = (ClusterInActivateEvent) Util.
-                                                jsonToObject(message, ClusterInActivateEvent.class);
-
-            if(log.isDebugEnabled()) {
-                log.debug("Received ClusterInActivateEvent: " + event.toString());
-            }
-            // Notify event listeners
-            notifyEventListeners(event);
-            return true;
-        } else {
-            if (nextProcessor != null) {
-                return nextProcessor.process(type, message, object);
-            } else {
-                throw new RuntimeException(String.format("Failed to process cluster activated message using available message processors: [type] %s [body] %s", type, message));
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusGroupActivatedMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusGroupActivatedMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusGroupActivatedMessageProcessor.java
deleted file mode 100644
index 01c3fa6..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusGroupActivatedMessageProcessor.java
+++ /dev/null
@@ -1,62 +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.messaging.message.processor.application.status;
-
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.messaging.event.application.status.ClusterActivatedEvent;
-import org.apache.stratos.messaging.event.application.status.GroupActivatedEvent;
-import org.apache.stratos.messaging.message.processor.MessageProcessor;
-import org.apache.stratos.messaging.util.Util;
-
-public class ApplicationStatusGroupActivatedMessageProcessor extends MessageProcessor {
-    private static final Log log =
-            LogFactory.getLog(ApplicationStatusGroupActivatedMessageProcessor.class);
-    private MessageProcessor nextProcessor;
-
-    @Override
-    public void setNext(MessageProcessor nextProcessor) {
-        this.nextProcessor = nextProcessor;
-    }
-
-    @Override
-    public boolean process(String type, String message, Object object) {
-        if (GroupActivatedEvent.class.getName().equals(type)) {
-            // Parse complete message and build event
-            GroupActivatedEvent event =
-                    (GroupActivatedEvent) Util.jsonToObject(message, GroupActivatedEvent.class);
-
-            if (log.isDebugEnabled()) {
-                log.debug("Received GroupActivatedEvent: " + event.toString());
-            }
-            // Notify event listeners
-            notifyEventListeners(event);
-            return true;
-        } else {
-            if (nextProcessor != null) {
-                return nextProcessor.process(type, message, object);
-            } else {
-                throw new RuntimeException(
-                        String.format("Failed to process group activated message " +
-                                "using available message processors: [type] %s [body] %s", type, message));
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusGroupInActivatedMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusGroupInActivatedMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusGroupInActivatedMessageProcessor.java
deleted file mode 100644
index 2f7f231..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusGroupInActivatedMessageProcessor.java
+++ /dev/null
@@ -1,61 +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.messaging.message.processor.application.status;
-
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.messaging.event.application.status.GroupInactivateEvent;
-import org.apache.stratos.messaging.message.processor.MessageProcessor;
-import org.apache.stratos.messaging.util.Util;
-
-public class ApplicationStatusGroupInActivatedMessageProcessor extends MessageProcessor {
-    private static final Log log =
-            LogFactory.getLog(ApplicationStatusGroupInActivatedMessageProcessor.class);
-    private MessageProcessor nextProcessor;
-
-    @Override
-    public void setNext(MessageProcessor nextProcessor) {
-        this.nextProcessor = nextProcessor;
-    }
-
-    @Override
-    public boolean process(String type, String message, Object object) {
-        if (GroupInactivateEvent.class.getName().equals(type)) {
-            // Parse complete message and build event
-            GroupInactivateEvent event =
-                    (GroupInactivateEvent) Util.jsonToObject(message, GroupInactivateEvent.class);
-
-            if (log.isDebugEnabled()) {
-                log.debug("Received GroupInActivateEvent: " + event.toString());
-            }
-            // Notify event listeners
-            notifyEventListeners(event);
-            return true;
-        } else {
-            if (nextProcessor != null) {
-                return nextProcessor.process(type, message, object);
-            } else {
-                throw new RuntimeException(
-                        String.format("Failed to process group in activated message " +
-                                "using available message processors: [type] %s [body] %s", type, message));
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusGroupTerminatedMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusGroupTerminatedMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusGroupTerminatedMessageProcessor.java
deleted file mode 100644
index 93dd750..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusGroupTerminatedMessageProcessor.java
+++ /dev/null
@@ -1,61 +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.messaging.message.processor.application.status;
-
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.messaging.event.application.status.GroupInTerminatedEvent;
-import org.apache.stratos.messaging.message.processor.MessageProcessor;
-import org.apache.stratos.messaging.util.Util;
-
-public class ApplicationStatusGroupTerminatedMessageProcessor extends MessageProcessor {
-    private static final Log log =
-            LogFactory.getLog(ApplicationStatusGroupTerminatedMessageProcessor.class);
-    private MessageProcessor nextProcessor;
-
-    @Override
-    public void setNext(MessageProcessor nextProcessor) {
-        this.nextProcessor = nextProcessor;
-    }
-
-    @Override
-    public boolean process(String type, String message, Object object) {
-        if (GroupInTerminatedEvent.class.getName().equals(type)) {
-            // Parse complete message and build event
-            GroupInTerminatedEvent event =
-                    (GroupInTerminatedEvent) Util.jsonToObject(message, GroupInTerminatedEvent.class);
-
-            if (log.isDebugEnabled()) {
-                log.debug("Received GroupTerminatingEvent: " + event.toString());
-            }
-            // Notify event listeners
-            notifyEventListeners(event);
-            return true;
-        } else {
-            if (nextProcessor != null) {
-                return nextProcessor.process(type, message, object);
-            } else {
-                throw new RuntimeException(
-                        String.format("Failed to process group in GroupTerminatingEvent message " +
-                                "using available message processors: [type] %s [body] %s", type, message));
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusGroupTerminatingMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusGroupTerminatingMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusGroupTerminatingMessageProcessor.java
deleted file mode 100644
index 493bd6c..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusGroupTerminatingMessageProcessor.java
+++ /dev/null
@@ -1,61 +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.messaging.message.processor.application.status;
-
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.messaging.event.topology.GroupTerminatingEvent;
-import org.apache.stratos.messaging.message.processor.MessageProcessor;
-import org.apache.stratos.messaging.util.Util;
-
-public class ApplicationStatusGroupTerminatingMessageProcessor extends MessageProcessor {
-    private static final Log log =
-            LogFactory.getLog(ApplicationStatusGroupTerminatingMessageProcessor.class);
-    private MessageProcessor nextProcessor;
-
-    @Override
-    public void setNext(MessageProcessor nextProcessor) {
-        this.nextProcessor = nextProcessor;
-    }
-
-    @Override
-    public boolean process(String type, String message, Object object) {
-        if (GroupTerminatingEvent.class.getName().equals(type)) {
-            // Parse complete message and build event
-            GroupTerminatingEvent event =
-                    (GroupTerminatingEvent) Util.jsonToObject(message, GroupTerminatingEvent.class);
-
-            if (log.isDebugEnabled()) {
-                log.debug("Received GroupTerminatingEvent: " + event.toString());
-            }
-            // Notify event listeners
-            notifyEventListeners(event);
-            return true;
-        } else {
-            if (nextProcessor != null) {
-                return nextProcessor.process(type, message, object);
-            } else {
-                throw new RuntimeException(
-                        String.format("Failed to process group in GroupTerminatingEvent message " +
-                                "using available message processors: [type] %s [body] %s", type, message));
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusMessageProcessorChain.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusMessageProcessorChain.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusMessageProcessorChain.java
deleted file mode 100644
index 8d2cdf6..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/ApplicationStatusMessageProcessorChain.java
+++ /dev/null
@@ -1,126 +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.messaging.message.processor.application.status;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.messaging.listener.EventListener;
-import org.apache.stratos.messaging.listener.application.status.*;
-import org.apache.stratos.messaging.message.processor.MessageProcessorChain;
-
-/**
- * Application Status processor chain is to handle the list processors to parse the application
- * status.
- */
-public class ApplicationStatusMessageProcessorChain extends MessageProcessorChain {
-    private static final Log log = LogFactory.getLog(ApplicationStatusMessageProcessorChain.class);
-
-    private ApplicationStatusClusterActivatedMessageProcessor clusterActivatedMessageProcessor;
-    private ApplicationStatusClusterInActivateMessageProcessor clusterInActivateMessageProcessor;
-    private AppStatusClusterTerminatingMessageProcessor clusterTerminatingMessageProcessor;
-    private AppStatusClusterTerminatedMessageProcessor clusterTerminatedMessageProcessor;
-    private ApplicationStatusGroupActivatedMessageProcessor groupActivatedMessageProcessor;
-    private ApplicationStatusGroupInActivatedMessageProcessor groupInActivateMessageProcessor;
-    private ApplicationStatusAppActivatedMessageProcessor appActivatedMessageProcessor;
-    private ApplicationStatusAppCreatedMessageProcessor applicationStatusAppCreatedMessageProcessor;
-    private ApplicationStatusAppInActivatedMessageProcessor applicationStatusAppInActivatedMessageProcessor;
-    private ApplicationStatusAppTerminatedMessageProcessor applicationStatusAppTerminatedMessageProcessor;
-    private ApplicationStatusAppTerminatingMessageProcessor applicationStatusAppTerminatingMessageProcessor;
-
-    private ApplicationStatusGroupTerminatedMessageProcessor groupTerminatedMessageProcessor;
-    private ApplicationStatusGroupTerminatingMessageProcessor groupTerminatingMessageProcessor;
-
-    public void initialize() {
-        // Add instance notifier event processors
-        clusterActivatedMessageProcessor = new ApplicationStatusClusterActivatedMessageProcessor();
-        add(clusterActivatedMessageProcessor);
-
-        clusterInActivateMessageProcessor = new ApplicationStatusClusterInActivateMessageProcessor();
-        add(clusterInActivateMessageProcessor);
-
-        clusterTerminatingMessageProcessor = new AppStatusClusterTerminatingMessageProcessor();
-        add(clusterTerminatingMessageProcessor);
-        clusterTerminatedMessageProcessor = new AppStatusClusterTerminatedMessageProcessor();
-        add(clusterTerminatedMessageProcessor);
-
-        groupActivatedMessageProcessor = new ApplicationStatusGroupActivatedMessageProcessor();
-        add(groupActivatedMessageProcessor);
-
-        groupInActivateMessageProcessor = new ApplicationStatusGroupInActivatedMessageProcessor();
-        add(groupInActivateMessageProcessor);
-
-        appActivatedMessageProcessor = new ApplicationStatusAppActivatedMessageProcessor();
-        add(appActivatedMessageProcessor);
-
-        applicationStatusAppCreatedMessageProcessor = new ApplicationStatusAppCreatedMessageProcessor();
-        this.add(applicationStatusAppCreatedMessageProcessor);
-
-        applicationStatusAppInActivatedMessageProcessor = new ApplicationStatusAppInActivatedMessageProcessor();
-        this.add(applicationStatusAppInActivatedMessageProcessor);
-
-        applicationStatusAppTerminatedMessageProcessor = new ApplicationStatusAppTerminatedMessageProcessor();
-        this.add(applicationStatusAppTerminatedMessageProcessor);
-
-        applicationStatusAppTerminatingMessageProcessor = new ApplicationStatusAppTerminatingMessageProcessor();
-        this.add(applicationStatusAppTerminatingMessageProcessor);
-
-        groupTerminatedMessageProcessor = new ApplicationStatusGroupTerminatedMessageProcessor();
-        this.add(groupTerminatedMessageProcessor);
-
-        groupTerminatingMessageProcessor = new ApplicationStatusGroupTerminatingMessageProcessor();
-        this.add(groupTerminatingMessageProcessor);
-
-        if (log.isDebugEnabled()) {
-            log.debug("Instance notifier message processor chain initialized");
-        }
-    }
-
-    public void addEventListener(EventListener eventListener) {
-        if (eventListener instanceof ClusterActivatedEventListener) {
-            clusterActivatedMessageProcessor.addEventListener(eventListener);
-        } else if (eventListener instanceof ClusterInActivateEventListener) {
-            clusterInActivateMessageProcessor.addEventListener(eventListener);
-        } else if (eventListener instanceof GroupActivatedEventListener) {
-            groupActivatedMessageProcessor.addEventListener(eventListener);
-        } else if(eventListener instanceof AppStatusClusterTerminatedEventListener){
-            clusterTerminatedMessageProcessor.addEventListener(eventListener);
-        } else if(eventListener instanceof AppStatusClusterTerminatingEventListener){
-            clusterTerminatingMessageProcessor.addEventListener(eventListener);
-        }else if (eventListener instanceof GroupInactivateEventListener) {
-            groupInActivateMessageProcessor.addEventListener(eventListener);
-        } else if (eventListener instanceof ApplicationActivatedEventListener) {
-            appActivatedMessageProcessor.addEventListener(eventListener);
-        } else if(eventListener instanceof ApplicationInActivatedEventListener){
-            applicationStatusAppInActivatedMessageProcessor.addEventListener(eventListener);
-        } else if(eventListener instanceof ApplicationCreatedEventListener){
-            applicationStatusAppCreatedMessageProcessor.addEventListener(eventListener);
-        } else if(eventListener instanceof ApplicationTerminatingEventListener){
-            applicationStatusAppTerminatingMessageProcessor.addEventListener(eventListener);
-        } else if(eventListener instanceof ApplicationTerminatedEventListener){
-            applicationStatusAppTerminatedMessageProcessor.addEventListener(eventListener);
-        } else if (eventListener instanceof GroupTerminatingEventListener){
-            groupTerminatingMessageProcessor.addEventListener(eventListener);
-        } else if (eventListener instanceof GroupTerminatedEventListener){
-            groupTerminatedMessageProcessor.addEventListener(eventListener);
-        } else
-        {
-            throw new RuntimeException("Unknown event listener " + eventListener.toString());
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/application/status/ApplicationStatusEventMessageDelegator.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/application/status/ApplicationStatusEventMessageDelegator.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/application/status/ApplicationStatusEventMessageDelegator.java
index 2b1ad5b..9eda9e0 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/application/status/ApplicationStatusEventMessageDelegator.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/application/status/ApplicationStatusEventMessageDelegator.java
@@ -22,7 +22,7 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.stratos.messaging.listener.EventListener;
 import org.apache.stratos.messaging.message.processor.MessageProcessorChain;
-import org.apache.stratos.messaging.message.processor.application.status.ApplicationStatusMessageProcessorChain;
+import org.apache.stratos.messaging.message.processor.application.status.AppStatusMessageProcessorChain;
 import org.apache.stratos.messaging.util.Constants;
 
 import javax.jms.TextMessage;
@@ -36,7 +36,7 @@ public class ApplicationStatusEventMessageDelegator implements Runnable {
 
     public ApplicationStatusEventMessageDelegator(ApplicationStatusEventMessageQueue messageQueue) {
         this.messageQueue = messageQueue;
-        this.processorChain = new ApplicationStatusMessageProcessorChain();
+        this.processorChain = new AppStatusMessageProcessorChain();
     }
 
     public void addEventListener(EventListener eventListener) {


[3/3] git commit: rename application status events, listeners and processors with prefix appstatus

Posted by ud...@apache.org.
rename application status events, listeners and processors with prefix appstatus


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

Branch: refs/heads/4.0.0-grouping
Commit: 4e4ba5b38b5917468987e4d9329050e40a9cfb43
Parents: 4f59f4b
Author: Udara Liyanage <ud...@wso2.com>
Authored: Mon Oct 27 11:00:25 2014 +0530
Committer: Udara Liyanage <ud...@wso2.com>
Committed: Mon Oct 27 11:00:25 2014 +0530

----------------------------------------------------------------------
 .../grouping/topic/StatusEventPublisher.java    |  39 +++---
 .../ApplicationStatusTopicReceiver.java         |  40 +++---
 .../controller/topology/TopologyBuilder.java    |  38 +++---
 .../AppStatusApplicationActivatedEvent.java     |  38 ++++++
 .../AppStatusApplicationCreatedEvent.java       |  38 ++++++
 .../AppStatusApplicationInactivatedEvent.java   |  38 ++++++
 .../AppStatusApplicationTerminatedEvent.java    |  47 +++++++
 .../AppStatusApplicationTerminatingEvent.java   |  38 ++++++
 .../status/AppStatusClusterActivatedEvent.java  |  50 ++++++++
 .../status/AppStatusClusterInactivateEvent.java |  50 ++++++++
 .../AppStatusClusterMaintenanceModeEvent.java   |  49 ++++++++
 .../AppStatusClusterReadyToShutdownEvent.java   |  47 +++++++
 .../status/AppStatusGroupActivatedEvent.java    |  44 +++++++
 .../status/AppStatusGroupInactivateEvent.java   |  44 +++++++
 .../AppStatusGroupMaintenanceModeEvent.java     |  41 ++++++
 .../AppStatusGroupReadyToShutdownEvent.java     |  40 ++++++
 .../status/AppStatusGroupTerminatedEvent.java   |  44 +++++++
 .../status/AppStatusGroupTerminatingEvent.java  |  44 +++++++
 .../status/ApplicationActivatedEvent.java       |  38 ------
 .../status/ApplicationCreatedEvent.java         |  38 ------
 .../status/ApplicationInactivatedEvent.java     |  38 ------
 .../status/ApplicationTerminatedEvent.java      |  47 -------
 .../status/ApplicationTerminatingEvent.java     |  38 ------
 .../status/ClusterActivatedEvent.java           |  52 --------
 .../status/ClusterInActivateEvent.java          |  50 --------
 .../status/ClusterMaintenanceModeEvent.java     |  49 --------
 .../status/ClusterReadyToShutdownEvent.java     |  47 -------
 .../application/status/GroupActivatedEvent.java |  44 -------
 .../status/GroupInTerminatedEvent.java          |  44 -------
 .../status/GroupInTerminatingEvent.java         |  44 -------
 .../status/GroupInactivateEvent.java            |  44 -------
 .../status/GroupMaintenanceModeEvent.java       |  41 ------
 .../status/GroupReadyToShutdownEvent.java       |  40 ------
 ...StatusApplicationActivatedEventListener.java |  27 ++++
 ...ppStatusApplicationCreatedEventListener.java |  27 ++++
 ...atusApplicationInactivatedEventListener.java |  27 ++++
 ...tatusApplicationTerminatedEventListener.java |  27 ++++
 ...atusApplicationTerminatingEventListener.java |  27 ++++
 .../AppStatusClusterActivatedEventListener.java |  24 ++++
 ...AppStatusClusterInactivateEventListener.java |  24 ++++
 .../AppStatusGroupActivatedEventListener.java   |  27 ++++
 .../AppStatusGroupInactivateEventListener.java  |  27 ++++
 .../AppStatusGroupTerminatedEventListener.java  |  24 ++++
 .../AppStatusGroupTerminatingEventListener.java |  27 ++++
 .../ApplicationActivatedEventListener.java      |  27 ----
 .../status/ApplicationCreatedEventListener.java |  27 ----
 .../ApplicationInActivatedEventListener.java    |  27 ----
 .../ApplicationTerminatedEventListener.java     |  27 ----
 .../ApplicationTerminatingEventListener.java    |  27 ----
 .../status/ClusterActivatedEventListener.java   |  24 ----
 .../status/ClusterInActivateEventListener.java  |  24 ----
 .../status/GroupActivatedEventListener.java     |  27 ----
 .../status/GroupInactivateEventListener.java    |  27 ----
 .../status/GroupTerminatedEventListener.java    |  24 ----
 .../status/GroupTerminatingEventListener.java   |  27 ----
 ...tusApplicationActivatedMessageProcessor.java |  65 ++++++++++
 ...tatusApplicationCreatedMessageProcessor.java |  63 ++++++++++
 ...sApplicationInactivatedMessageProcessor.java |  63 ++++++++++
 ...usApplicationTerminatedMessageProcessor.java |  63 ++++++++++
 ...sApplicationTerminatingMessageProcessor.java |  63 ++++++++++
 ...pStatusClusterActivatedMessageProcessor.java |  57 +++++++++
 ...StatusClusterInactivateMessageProcessor.java |  58 +++++++++
 ...AppStatusGroupActivatedMessageProcessor.java |  61 +++++++++
 ...pStatusGroupInactivatedMessageProcessor.java |  61 +++++++++
 ...ppStatusGroupTerminatedMessageProcessor.java |  61 +++++++++
 ...pStatusGroupTerminatingMessageProcessor.java |  61 +++++++++
 .../status/AppStatusMessageProcessorChain.java  | 126 +++++++++++++++++++
 ...ationStatusAppActivatedMessageProcessor.java |  67 ----------
 ...icationStatusAppCreatedMessageProcessor.java |  63 ----------
 ...ionStatusAppInActivatedMessageProcessor.java |  63 ----------
 ...tionStatusAppTerminatedMessageProcessor.java |  63 ----------
 ...ionStatusAppTerminatingMessageProcessor.java |  63 ----------
 ...nStatusClusterActivatedMessageProcessor.java |  57 ---------
 ...StatusClusterInActivateMessageProcessor.java |  59 ---------
 ...ionStatusGroupActivatedMessageProcessor.java |  62 ---------
 ...nStatusGroupInActivatedMessageProcessor.java |  61 ---------
 ...onStatusGroupTerminatedMessageProcessor.java |  61 ---------
 ...nStatusGroupTerminatingMessageProcessor.java |  61 ---------
 .../ApplicationStatusMessageProcessorChain.java | 126 -------------------
 .../ApplicationStatusEventMessageDelegator.java |   4 +-
 80 files changed, 1802 insertions(+), 1809 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/grouping/topic/StatusEventPublisher.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/grouping/topic/StatusEventPublisher.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/grouping/topic/StatusEventPublisher.java
index c0c64ac..3a3af88 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/grouping/topic/StatusEventPublisher.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/grouping/topic/StatusEventPublisher.java
@@ -7,14 +7,13 @@ import org.apache.stratos.messaging.broker.publish.EventPublisherPool;
 import org.apache.stratos.messaging.domain.topology.ClusterDataHolder;
 import org.apache.stratos.messaging.event.Event;
 import org.apache.stratos.messaging.event.application.status.*;
-import org.apache.stratos.messaging.event.application.status.ApplicationActivatedEvent;
-import org.apache.stratos.messaging.event.application.status.ApplicationInactivatedEvent;
-import org.apache.stratos.messaging.event.application.status.ApplicationTerminatedEvent;
-import org.apache.stratos.messaging.event.application.status.ApplicationTerminatingEvent;
-import org.apache.stratos.messaging.event.application.status.ClusterActivatedEvent;
-import org.apache.stratos.messaging.event.application.status.ClusterInActivateEvent;
-import org.apache.stratos.messaging.event.application.status.ClusterMaintenanceModeEvent;
-import org.apache.stratos.messaging.event.application.status.GroupActivatedEvent;
+import org.apache.stratos.messaging.event.application.status.AppStatusApplicationActivatedEvent;
+import org.apache.stratos.messaging.event.application.status.AppStatusApplicationInactivatedEvent;
+import org.apache.stratos.messaging.event.application.status.AppStatusApplicationTerminatedEvent;
+import org.apache.stratos.messaging.event.application.status.AppStatusApplicationTerminatingEvent;
+import org.apache.stratos.messaging.event.application.status.AppStatusClusterActivatedEvent;
+import org.apache.stratos.messaging.event.application.status.AppStatusClusterInactivateEvent;
+import org.apache.stratos.messaging.event.application.status.AppStatusGroupActivatedEvent;
 import org.apache.stratos.messaging.event.topology.*;
 import org.apache.stratos.messaging.event.topology.GroupInactivateEvent;
 import org.apache.stratos.messaging.util.Constants;
@@ -47,8 +46,8 @@ public class StatusEventPublisher {
                     " [cluster]: " + clusterId);
         }
 
-        ClusterActivatedEvent clusterActivatedEvent =
-                                            new ClusterActivatedEvent(appId, serviceName, clusterId);
+        AppStatusClusterActivatedEvent clusterActivatedEvent =
+                                            new AppStatusClusterActivatedEvent(appId, serviceName, clusterId);
 
         publishEvent(clusterActivatedEvent);
     }
@@ -60,8 +59,8 @@ public class StatusEventPublisher {
                     " [cluster]: " + clusterId);
         }
 
-        ClusterInActivateEvent clusterInActivateEvent =
-                                        new ClusterInActivateEvent(appId, serviceName, clusterId);
+        AppStatusClusterInactivateEvent clusterInActivateEvent =
+                                        new AppStatusClusterInactivateEvent(appId, serviceName, clusterId);
 
         publishEvent(clusterInActivateEvent);
     }
@@ -99,7 +98,7 @@ public class StatusEventPublisher {
                     " [group]: " + groupId);
         }
 
-        GroupActivatedEvent groupActivatedEvent = new GroupActivatedEvent(appId, groupId);
+        AppStatusGroupActivatedEvent groupActivatedEvent = new AppStatusGroupActivatedEvent(appId, groupId);
 
         publishEvent(groupActivatedEvent);
     }
@@ -123,7 +122,7 @@ public class StatusEventPublisher {
                     " [group]: " + groupId);
         }
 
-        GroupInTerminatingEvent groupInTerminatingEvent = new GroupInTerminatingEvent(appId, groupId);
+        AppStatusGroupTerminatingEvent groupInTerminatingEvent = new AppStatusGroupTerminatingEvent(appId, groupId);
         publishEvent(groupInTerminatingEvent);
     }
 
@@ -134,7 +133,7 @@ public class StatusEventPublisher {
                     " [group]: " + groupId);
         }
 
-        GroupInTerminatedEvent groupInTerminatedEvent = new GroupInTerminatedEvent(appId, groupId);
+        AppStatusGroupTerminatedEvent groupInTerminatedEvent = new AppStatusGroupTerminatedEvent(appId, groupId);
         publishEvent(groupInTerminatedEvent);
     }
 
@@ -144,7 +143,7 @@ public class StatusEventPublisher {
             log.info("Publishing Application activated event for [application]: " + appId);
         }
 
-        ApplicationActivatedEvent applicationActivatedEvent = new ApplicationActivatedEvent(appId);
+        AppStatusApplicationActivatedEvent applicationActivatedEvent = new AppStatusApplicationActivatedEvent(appId);
 
         publishEvent(applicationActivatedEvent);
     }
@@ -154,7 +153,7 @@ public class StatusEventPublisher {
             log.info("Publishing Application Inactivated event for [application]: " + appId);
         }
 
-        ApplicationInactivatedEvent applicationInActivatedEvent = new ApplicationInactivatedEvent(appId);
+        AppStatusApplicationInactivatedEvent applicationInActivatedEvent = new AppStatusApplicationInactivatedEvent(appId);
 
         publishEvent(applicationInActivatedEvent);
     }
@@ -164,7 +163,7 @@ public class StatusEventPublisher {
             log.info("Publishing Application terminated event for [application]: " + appId);
         }
 
-        ApplicationTerminatingEvent applicationTerminatingEvent = new ApplicationTerminatingEvent(appId);
+        AppStatusApplicationTerminatingEvent applicationTerminatingEvent = new AppStatusApplicationTerminatingEvent(appId);
 
         publishEvent(applicationTerminatingEvent);
     }
@@ -174,8 +173,8 @@ public class StatusEventPublisher {
             log.info("Publishing Application terminated event for [application]: " + appId);
         }
 
-        ApplicationTerminatedEvent applicationTerminatedEvent =
-                new ApplicationTerminatedEvent(appId, clusterData);
+        AppStatusApplicationTerminatedEvent applicationTerminatedEvent =
+                new AppStatusApplicationTerminatedEvent(appId, clusterData);
 
         publishEvent(applicationTerminatedEvent);
     }

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/application/status/receiver/ApplicationStatusTopicReceiver.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/application/status/receiver/ApplicationStatusTopicReceiver.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/application/status/receiver/ApplicationStatusTopicReceiver.java
index 1a62fef..ca93dce 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/application/status/receiver/ApplicationStatusTopicReceiver.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/application/status/receiver/ApplicationStatusTopicReceiver.java
@@ -64,10 +64,10 @@ public class ApplicationStatusTopicReceiver implements Runnable {
 
     private void addEventListeners() {
         // Listen to topology events that affect clusters
-        statusEventReceiver.addEventListener(new ClusterActivatedEventListener() {
+        statusEventReceiver.addEventListener(new AppStatusClusterActivatedEventListener() {
             @Override
             protected void onEvent(Event event) {
-                TopologyBuilder.handleClusterActivatedEvent((ClusterActivatedEvent) event);
+                TopologyBuilder.handleClusterActivatedEvent((AppStatusClusterActivatedEvent) event);
             }
         });
 
@@ -85,75 +85,75 @@ public class ApplicationStatusTopicReceiver implements Runnable {
             }
         });
 
-        statusEventReceiver.addEventListener(new ClusterInActivateEventListener() {
+        statusEventReceiver.addEventListener(new AppStatusClusterInactivateEventListener() {
             @Override
             protected void onEvent(Event event) {
-                TopologyBuilder.handleClusterInActivateEvent((ClusterInActivateEvent) event);
+                TopologyBuilder.handleClusterInActivateEvent((AppStatusClusterInactivateEvent) event);
             }
         });
 
-        statusEventReceiver.addEventListener(new GroupActivatedEventListener() {
+        statusEventReceiver.addEventListener(new AppStatusGroupActivatedEventListener() {
             @Override
             protected void onEvent(Event event) {
-                TopologyBuilder.handleGroupActivatedEvent((GroupActivatedEvent) event);
+                TopologyBuilder.handleGroupActivatedEvent((AppStatusGroupActivatedEvent) event);
 
             }
         });
 
-        statusEventReceiver.addEventListener(new GroupTerminatedEventListener() {
+        statusEventReceiver.addEventListener(new AppStatusGroupTerminatedEventListener() {
             @Override
             protected void onEvent(Event event) {
-                TopologyBuilder.handleGroupTerminatedEvent((GroupInTerminatedEvent) event);
+                TopologyBuilder.handleGroupTerminatedEvent((AppStatusGroupTerminatedEvent) event);
 
             }
         });
 
-        statusEventReceiver.addEventListener(new GroupTerminatingEventListener() {
+        statusEventReceiver.addEventListener(new AppStatusGroupTerminatingEventListener() {
             @Override
             protected void onEvent(Event event) {
-                TopologyBuilder.handleGroupTerminatingEvent((GroupInTerminatingEvent) event);
+                TopologyBuilder.handleGroupTerminatingEvent((AppStatusGroupTerminatingEvent) event);
 
             }
         });
 
-        statusEventReceiver.addEventListener(new ApplicationActivatedEventListener() {
+        statusEventReceiver.addEventListener(new AppStatusApplicationActivatedEventListener() {
 
             @Override
             protected void onEvent(Event event) {
-                TopologyBuilder.handleApplicationActivatedEvent((ApplicationActivatedEvent) event);
+                TopologyBuilder.handleApplicationActivatedEvent((AppStatusApplicationActivatedEvent) event);
 
             }
         });
 
-        statusEventReceiver.addEventListener(new ApplicationInActivatedEventListener() {
+        statusEventReceiver.addEventListener(new AppStatusApplicationInactivatedEventListener() {
 
             @Override
             protected void onEvent(Event event) {
-                TopologyBuilder.handleApplicationInActivatedEvent((ApplicationInactivatedEvent) event);
+                TopologyBuilder.handleApplicationInActivatedEvent((AppStatusApplicationInactivatedEvent) event);
 
             }
         });
 
-        statusEventReceiver.addEventListener(new ApplicationCreatedEventListener() {
+        statusEventReceiver.addEventListener(new AppStatusApplicationCreatedEventListener() {
             @Override
             protected void onEvent(Event event) {
-                TopologyBuilder.handleApplicationCreatedEvent((ApplicationCreatedEvent) event);
+                TopologyBuilder.handleApplicationCreatedEvent((AppStatusApplicationCreatedEvent) event);
 
             }
         });
 
-        statusEventReceiver.addEventListener(new ApplicationTerminatingEventListener() {
+        statusEventReceiver.addEventListener(new AppStatusApplicationTerminatingEventListener() {
             @Override
             protected void onEvent(Event event) {
-                TopologyBuilder.handleApplicationTerminatingEvent((ApplicationTerminatingEvent) event);
+                TopologyBuilder.handleApplicationTerminatingEvent((AppStatusApplicationTerminatingEvent) event);
 
             }
         });
 
-        statusEventReceiver.addEventListener(new ApplicationTerminatedEventListener() {
+        statusEventReceiver.addEventListener(new AppStatusApplicationTerminatedEventListener() {
             @Override
             protected void onEvent(Event event) {
-                TopologyBuilder.handleApplicationTerminatedEvent((ApplicationTerminatedEvent) event);
+                TopologyBuilder.handleApplicationTerminatedEvent((AppStatusApplicationTerminatedEvent) event);
 
             }
         });

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/topology/TopologyBuilder.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/topology/TopologyBuilder.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/topology/TopologyBuilder.java
index 4d929b1..3e04311 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/topology/TopologyBuilder.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/topology/TopologyBuilder.java
@@ -32,14 +32,14 @@ import org.apache.stratos.cloud.controller.util.CloudControllerUtil;
 import org.apache.stratos.messaging.domain.topology.*;
 import org.apache.stratos.messaging.domain.topology.util.CompositeApplicationBuilder;
 import org.apache.stratos.messaging.event.application.status.*;
-import org.apache.stratos.messaging.event.application.status.ApplicationActivatedEvent;
-import org.apache.stratos.messaging.event.application.status.ApplicationCreatedEvent;
-import org.apache.stratos.messaging.event.application.status.ApplicationInactivatedEvent;
-import org.apache.stratos.messaging.event.application.status.ApplicationTerminatedEvent;
-import org.apache.stratos.messaging.event.application.status.ApplicationTerminatingEvent;
-import org.apache.stratos.messaging.event.application.status.ClusterActivatedEvent;
-import org.apache.stratos.messaging.event.application.status.GroupActivatedEvent;
-import org.apache.stratos.messaging.event.application.status.GroupInactivateEvent;
+import org.apache.stratos.messaging.event.application.status.AppStatusApplicationActivatedEvent;
+import org.apache.stratos.messaging.event.application.status.AppStatusApplicationCreatedEvent;
+import org.apache.stratos.messaging.event.application.status.AppStatusApplicationInactivatedEvent;
+import org.apache.stratos.messaging.event.application.status.AppStatusApplicationTerminatedEvent;
+import org.apache.stratos.messaging.event.application.status.AppStatusApplicationTerminatingEvent;
+import org.apache.stratos.messaging.event.application.status.AppStatusClusterActivatedEvent;
+import org.apache.stratos.messaging.event.application.status.AppStatusGroupActivatedEvent;
+import org.apache.stratos.messaging.event.application.status.AppStatusGroupInactivateEvent;
 import org.apache.stratos.messaging.event.instance.status.InstanceActivatedEvent;
 import org.apache.stratos.messaging.event.instance.status.InstanceMaintenanceModeEvent;
 import org.apache.stratos.messaging.event.instance.status.InstanceReadyToShutdownEvent;
@@ -743,7 +743,7 @@ public class TopologyBuilder {
     }
 
 
-    public static void handleClusterActivatedEvent(ClusterActivatedEvent clusterActivatedEvent) {
+    public static void handleClusterActivatedEvent(AppStatusClusterActivatedEvent clusterActivatedEvent) {
         Topology topology = TopologyManager.getTopology();
         Service service = topology.getService(clusterActivatedEvent.getServiceName());
         //update the status of the cluster
@@ -781,7 +781,7 @@ public class TopologyBuilder {
     }
 
     public static void handleClusterInActivateEvent(
-            org.apache.stratos.messaging.event.application.status.ClusterInActivateEvent clusterInActivateEvent) {
+            AppStatusClusterInactivateEvent clusterInActivateEvent) {
         Topology topology = TopologyManager.getTopology();
         Service service = topology.getService(clusterInActivateEvent.getServiceName());
         //update the status of the cluster
@@ -818,7 +818,7 @@ public class TopologyBuilder {
         TopologyEventPublisher.sendClusterInActivateEvent(clusterActivatedEvent1);
     }
 
-    public static void handleGroupActivatedEvent(GroupActivatedEvent groupActivatedEvent) {
+    public static void handleGroupActivatedEvent(AppStatusGroupActivatedEvent groupActivatedEvent) {
         Topology topology = TopologyManager.getTopology();
         Application application = topology.getApplication(groupActivatedEvent.getAppId());
         //update the status of the Group
@@ -852,7 +852,7 @@ public class TopologyBuilder {
         TopologyEventPublisher.sendGroupActivatedEvent(groupActivatedEvent1);
     }
 
-    public static void handleApplicationActivatedEvent(ApplicationActivatedEvent applicationActivatedEvent) {
+    public static void handleApplicationActivatedEvent(AppStatusApplicationActivatedEvent applicationActivatedEvent) {
         Topology topology = TopologyManager.getTopology();
         Application application = topology.getApplication(applicationActivatedEvent.getAppId());
         //update the status of the Group
@@ -878,7 +878,7 @@ public class TopologyBuilder {
         TopologyEventPublisher.sendApplicationActivatedEvent(applicationActivatedEvent1);
     }
 
-    public static void handleApplicationInActivatedEvent(ApplicationInactivatedEvent event) {
+    public static void handleApplicationInActivatedEvent(AppStatusApplicationInactivatedEvent event) {
         Topology topology = TopologyManager.getTopology();
         Application application = topology.getApplication(event.getAppId());
         //update the status of the Group
@@ -904,7 +904,7 @@ public class TopologyBuilder {
         TopologyEventPublisher.sendApplicationInactivatedEvent(applicationActivatedEvent);
     }
 
-    public static void handleApplicationCreatedEvent(ApplicationCreatedEvent event) {
+    public static void handleApplicationCreatedEvent(AppStatusApplicationCreatedEvent event) {
         Topology topology = TopologyManager.getTopology();
         Application application = topology.getApplication(event.getAppId());
         //update the status of the Group
@@ -937,7 +937,7 @@ public class TopologyBuilder {
         TopologyEventPublisher.sendApplicationCreatedEvent(applicationActivatedEvent);
     }
 
-    public static void handleApplicationTerminatingEvent(ApplicationTerminatingEvent event) {
+    public static void handleApplicationTerminatingEvent(AppStatusApplicationTerminatingEvent event) {
 
         String applicationId = event.getAppId();
 
@@ -986,7 +986,7 @@ public class TopologyBuilder {
         }
     }
 
-    public static void handleApplicationTerminatedEvent(ApplicationTerminatedEvent event) {
+    public static void handleApplicationTerminatedEvent(AppStatusApplicationTerminatedEvent event) {
 
      Topology topology = TopologyManager.getTopology();
 
@@ -1053,7 +1053,7 @@ public class TopologyBuilder {
         }
     }
 
-    public static void handleGroupInActiveEvent(GroupInactivateEvent event) {
+    public static void handleGroupInActiveEvent(AppStatusGroupInactivateEvent event) {
         Topology topology = TopologyManager.getTopology();
         Application application = topology.getApplication(event.getAppId());
         //update the status of the Group
@@ -1088,7 +1088,7 @@ public class TopologyBuilder {
     }
 
 
-    public static void handleGroupTerminatedEvent(GroupInTerminatedEvent event) {
+    public static void handleGroupTerminatedEvent(AppStatusGroupTerminatedEvent event) {
         Topology topology = TopologyManager.getTopology();
         Application application = topology.getApplication(event.getAppId());
         //update the status of the Group
@@ -1122,7 +1122,7 @@ public class TopologyBuilder {
         TopologyEventPublisher.sendGroupTerminatedEvent(groupTerminatedTopologyEvent);
     }
 
-    public static void handleGroupTerminatingEvent(GroupInTerminatingEvent event) {
+    public static void handleGroupTerminatingEvent(AppStatusGroupTerminatingEvent event) {
         Topology topology = TopologyManager.getTopology();
         Application application = topology.getApplication(event.getAppId());
         //update the status of the Group

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusApplicationActivatedEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusApplicationActivatedEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusApplicationActivatedEvent.java
new file mode 100644
index 0000000..f04ae02
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusApplicationActivatedEvent.java
@@ -0,0 +1,38 @@
+/*
+ * 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.messaging.event.application.status;
+
+import java.io.Serializable;
+
+/**
+ * This event will be fired upon the application activated is detected.
+ */
+public class AppStatusApplicationActivatedEvent extends StatusEvent implements Serializable {
+    private static final long serialVersionUID = 2625412714611885089L;
+
+    private String appId;
+
+    public AppStatusApplicationActivatedEvent(String appId) {
+        this.appId = appId;
+    }
+
+    public String getAppId() {
+        return appId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusApplicationCreatedEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusApplicationCreatedEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusApplicationCreatedEvent.java
new file mode 100644
index 0000000..c432e14
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusApplicationCreatedEvent.java
@@ -0,0 +1,38 @@
+/*
+ * 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.messaging.event.application.status;
+
+import java.io.Serializable;
+
+/**
+ * This event will be fired upon the application created is detected.
+ */
+public class AppStatusApplicationCreatedEvent extends StatusEvent implements Serializable {
+    private static final long serialVersionUID = 2625412714611885089L;
+
+    private String appId;
+
+    public AppStatusApplicationCreatedEvent(String appId) {
+        this.appId = appId;
+    }
+
+    public String getAppId() {
+        return appId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusApplicationInactivatedEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusApplicationInactivatedEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusApplicationInactivatedEvent.java
new file mode 100644
index 0000000..f00a97a
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusApplicationInactivatedEvent.java
@@ -0,0 +1,38 @@
+/*
+ * 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.messaging.event.application.status;
+
+import java.io.Serializable;
+
+/**
+ * This event will be fired upon the application inactivated is detected.
+ */
+public class AppStatusApplicationInactivatedEvent extends StatusEvent implements Serializable {
+    private static final long serialVersionUID = 2625412714611885089L;
+
+    private String appId;
+
+    public AppStatusApplicationInactivatedEvent(String appId) {
+        this.appId = appId;
+    }
+
+    public String getAppId() {
+        return appId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusApplicationTerminatedEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusApplicationTerminatedEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusApplicationTerminatedEvent.java
new file mode 100644
index 0000000..3fbb368
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusApplicationTerminatedEvent.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.messaging.event.application.status;
+
+import org.apache.stratos.messaging.domain.topology.ClusterDataHolder;
+
+import java.io.Serializable;
+import java.util.Set;
+
+/**
+ * This event will be fired upon the application terminated is detected.
+ */
+public class AppStatusApplicationTerminatedEvent extends StatusEvent implements Serializable {
+    private static final long serialVersionUID = 2625412714611885089L;
+
+    private String appId;
+    private Set<ClusterDataHolder> clusterData;
+
+    public AppStatusApplicationTerminatedEvent(String appId, Set<ClusterDataHolder> clusterData) {
+        this.appId = appId;
+        this.clusterData = clusterData;
+    }
+
+    public String getAppId() {
+        return appId;
+    }
+
+    public Set<ClusterDataHolder> getClusterData() {
+        return clusterData;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusApplicationTerminatingEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusApplicationTerminatingEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusApplicationTerminatingEvent.java
new file mode 100644
index 0000000..e2a3a09
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusApplicationTerminatingEvent.java
@@ -0,0 +1,38 @@
+/*
+ * 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.messaging.event.application.status;
+
+import java.io.Serializable;
+
+/**
+ * This event will be fired upon the application terminating is detected.
+ */
+public class AppStatusApplicationTerminatingEvent extends StatusEvent implements Serializable {
+    private static final long serialVersionUID = 2625412714611885089L;
+
+    private String appId;
+
+    public AppStatusApplicationTerminatingEvent(String appId) {
+        this.appId = appId;
+    }
+
+    public String getAppId() {
+        return appId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusClusterActivatedEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusClusterActivatedEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusClusterActivatedEvent.java
new file mode 100644
index 0000000..c5737c6
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusClusterActivatedEvent.java
@@ -0,0 +1,50 @@
+/*
+ * 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.messaging.event.application.status;
+
+/**
+ * This event is fired by cartridge agent when it has started the server and
+ * applications are ready to serve the incoming requests.
+ */
+public class AppStatusClusterActivatedEvent extends StatusEvent {
+    private static final long serialVersionUID = 2625412714611885089L;
+
+    private final String serviceName;
+    private final String clusterId;
+    private String appId;
+
+    public AppStatusClusterActivatedEvent(String appId, String serviceName, String clusterId) {
+        this.serviceName = serviceName;
+        this.clusterId = clusterId;
+        this.appId = appId;
+    }
+
+    public String getServiceName() {
+        return serviceName;
+    }
+
+    public String getClusterId() {
+        return clusterId;
+    }
+
+    public String getAppId() {
+        return appId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusClusterInactivateEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusClusterInactivateEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusClusterInactivateEvent.java
new file mode 100644
index 0000000..6d8ed46
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusClusterInactivateEvent.java
@@ -0,0 +1,50 @@
+/*
+ * 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.messaging.event.application.status;
+
+/**
+ * This event is fired by cartridge agent when it has started the server and
+ * applications are ready to serve the incoming requests.
+ */
+public class AppStatusClusterInactivateEvent extends StatusEvent {
+    private static final long serialVersionUID = 2625412714611885089L;
+
+    private final String serviceName;
+    private final String clusterId;
+    private String appId;
+
+    public AppStatusClusterInactivateEvent(String appId, String serviceName, String clusterId) {
+        this.serviceName = serviceName;
+        this.clusterId = clusterId;
+        this.appId = appId;
+    }
+
+    public String getServiceName() {
+        return serviceName;
+    }
+
+    public String getClusterId() {
+        return clusterId;
+    }
+
+    public String getAppId() {
+        return appId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusClusterMaintenanceModeEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusClusterMaintenanceModeEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusClusterMaintenanceModeEvent.java
new file mode 100644
index 0000000..527d86e
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusClusterMaintenanceModeEvent.java
@@ -0,0 +1,49 @@
+/*
+ * 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.messaging.event.application.status;
+
+import java.io.Serializable;
+
+/**
+ * This will be fired upon the cluster instability detection by either cep/autoscaler.
+ */
+public class AppStatusClusterMaintenanceModeEvent extends StatusEvent implements Serializable {
+    private final String serviceName;
+    private final String clusterId;
+    private String appId;
+
+    public AppStatusClusterMaintenanceModeEvent(String appId, String serviceName, String clusterId) {
+        this.serviceName = serviceName;
+        this.clusterId = clusterId;
+        this.appId = appId;
+    }
+
+    public String getServiceName() {
+        return serviceName;
+    }
+
+    public String getClusterId() {
+        return clusterId;
+    }
+
+
+    public String getAppId() {
+        return appId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusClusterReadyToShutdownEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusClusterReadyToShutdownEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusClusterReadyToShutdownEvent.java
new file mode 100644
index 0000000..7841d9c
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusClusterReadyToShutdownEvent.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.messaging.event.application.status;
+
+/**
+ * This event is fired by autoscaler before actually terminate a cluster.
+ */
+public class AppStatusClusterReadyToShutdownEvent extends StatusEvent {
+    private final String serviceName;
+    private final String clusterId;
+    private String appId;
+
+    public AppStatusClusterReadyToShutdownEvent(String appId, String serviceName, String clusterId) {
+        this.serviceName = serviceName;
+        this.clusterId = clusterId;
+        this.appId = appId;
+    }
+
+    public String getServiceName() {
+        return serviceName;
+    }
+
+    public String getClusterId() {
+        return clusterId;
+    }
+
+
+    public String getAppId() {
+        return appId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusGroupActivatedEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusGroupActivatedEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusGroupActivatedEvent.java
new file mode 100644
index 0000000..3da8667
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusGroupActivatedEvent.java
@@ -0,0 +1,44 @@
+/*
+ * 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.messaging.event.application.status;
+
+/**
+ * This event is fired by cartridge agent when it has started the server and
+ * applications are ready to serve the incoming requests.
+ */
+public class AppStatusGroupActivatedEvent extends StatusEvent {
+    private static final long serialVersionUID = 2625412714611885089L;
+
+    private String groupId;
+    private String appId;
+
+    public AppStatusGroupActivatedEvent(String appId, String groupId) {
+        this.appId = appId;
+        this.groupId = groupId;
+    }
+
+    public String getGroupId() {
+        return this.groupId;
+    }
+
+    public String getAppId() {
+        return appId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusGroupInactivateEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusGroupInactivateEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusGroupInactivateEvent.java
new file mode 100644
index 0000000..ee26292
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusGroupInactivateEvent.java
@@ -0,0 +1,44 @@
+/*
+ * 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.messaging.event.application.status;
+
+/**
+ * This event is fired by cartridge agent when it has started the server and
+ * applications are ready to serve the incoming requests.
+ */
+public class AppStatusGroupInactivateEvent extends StatusEvent {
+    private static final long serialVersionUID = 2625412714611885089L;
+
+    private String groupId;
+    private String appId;
+
+    public AppStatusGroupInactivateEvent(String appId, String groupId) {
+        this.appId = appId;
+        this.groupId = groupId;
+    }
+
+    public String getGroupId() {
+        return this.groupId;
+    }
+
+    public String getAppId() {
+        return appId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusGroupMaintenanceModeEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusGroupMaintenanceModeEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusGroupMaintenanceModeEvent.java
new file mode 100644
index 0000000..a1a787c
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusGroupMaintenanceModeEvent.java
@@ -0,0 +1,41 @@
+/*
+ * 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.messaging.event.application.status;
+
+/**
+ * This event will be fired upon the instability of group detection by autoscaler.
+ */
+public class AppStatusGroupMaintenanceModeEvent extends StatusEvent {
+    private String groupId;
+    private String appId;
+
+    public AppStatusGroupMaintenanceModeEvent(String appId, String groupId) {
+        this.appId = appId;
+        this.groupId = groupId;
+    }
+
+    public String getGroupId(String groupId) {
+        return this.groupId;
+    }
+
+    public String getAppId() {
+        return appId;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusGroupReadyToShutdownEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusGroupReadyToShutdownEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusGroupReadyToShutdownEvent.java
new file mode 100644
index 0000000..eaba17d
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusGroupReadyToShutdownEvent.java
@@ -0,0 +1,40 @@
+/*
+ * 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.messaging.event.application.status;
+
+/**
+ * This event is fired by autoscaler before actually terminate a group.
+ */
+public class AppStatusGroupReadyToShutdownEvent extends StatusEvent {
+    private String groupId;
+    private String appId;
+
+    public AppStatusGroupReadyToShutdownEvent(String appId, String groupId) {
+        this.appId = appId;
+        this.groupId = groupId;
+    }
+
+    public String getGroupId(String groupId) {
+        return this.groupId;
+    }
+
+    public String getAppId() {
+        return appId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusGroupTerminatedEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusGroupTerminatedEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusGroupTerminatedEvent.java
new file mode 100644
index 0000000..db31b64
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusGroupTerminatedEvent.java
@@ -0,0 +1,44 @@
+/*
+ * 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.messaging.event.application.status;
+
+/**
+ * This event is fired by cartridge agent when it has started the server and
+ * applications are ready to serve the incoming requests.
+ */
+public class AppStatusGroupTerminatedEvent extends StatusEvent {
+    private static final long serialVersionUID = 2625412714611885089L;
+
+    private String groupId;
+    private String appId;
+
+    public AppStatusGroupTerminatedEvent(String appId, String groupId) {
+        this.appId = appId;
+        this.groupId = groupId;
+    }
+
+    public String getGroupId() {
+        return this.groupId;
+    }
+
+    public String getAppId() {
+        return appId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusGroupTerminatingEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusGroupTerminatingEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusGroupTerminatingEvent.java
new file mode 100644
index 0000000..52db5fb
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/AppStatusGroupTerminatingEvent.java
@@ -0,0 +1,44 @@
+/*
+ * 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.messaging.event.application.status;
+
+/**
+ * This event is fired by cartridge agent when it has started the server and
+ * applications are ready to serve the incoming requests.
+ */
+public class AppStatusGroupTerminatingEvent extends StatusEvent {
+    private static final long serialVersionUID = 2625412714611885089L;
+
+    private String groupId;
+    private String appId;
+
+    public AppStatusGroupTerminatingEvent(String appId, String groupId) {
+        this.appId = appId;
+        this.groupId = groupId;
+    }
+
+    public String getGroupId() {
+        return this.groupId;
+    }
+
+    public String getAppId() {
+        return appId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ApplicationActivatedEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ApplicationActivatedEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ApplicationActivatedEvent.java
deleted file mode 100644
index 1f64c7a..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ApplicationActivatedEvent.java
+++ /dev/null
@@ -1,38 +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.messaging.event.application.status;
-
-import java.io.Serializable;
-
-/**
- * This event will be fired upon the application activated is detected.
- */
-public class ApplicationActivatedEvent extends StatusEvent implements Serializable {
-    private static final long serialVersionUID = 2625412714611885089L;
-
-    private String appId;
-
-    public ApplicationActivatedEvent(String appId) {
-        this.appId = appId;
-    }
-
-    public String getAppId() {
-        return appId;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ApplicationCreatedEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ApplicationCreatedEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ApplicationCreatedEvent.java
deleted file mode 100644
index b2f02e5..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ApplicationCreatedEvent.java
+++ /dev/null
@@ -1,38 +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.messaging.event.application.status;
-
-import java.io.Serializable;
-
-/**
- * This event will be fired upon the application created is detected.
- */
-public class ApplicationCreatedEvent extends StatusEvent implements Serializable {
-    private static final long serialVersionUID = 2625412714611885089L;
-
-    private String appId;
-
-    public ApplicationCreatedEvent(String appId) {
-        this.appId = appId;
-    }
-
-    public String getAppId() {
-        return appId;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ApplicationInactivatedEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ApplicationInactivatedEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ApplicationInactivatedEvent.java
deleted file mode 100644
index c082981..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ApplicationInactivatedEvent.java
+++ /dev/null
@@ -1,38 +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.messaging.event.application.status;
-
-import java.io.Serializable;
-
-/**
- * This event will be fired upon the application inactivated is detected.
- */
-public class ApplicationInactivatedEvent extends StatusEvent implements Serializable {
-    private static final long serialVersionUID = 2625412714611885089L;
-
-    private String appId;
-
-    public ApplicationInactivatedEvent(String appId) {
-        this.appId = appId;
-    }
-
-    public String getAppId() {
-        return appId;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ApplicationTerminatedEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ApplicationTerminatedEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ApplicationTerminatedEvent.java
deleted file mode 100644
index 5151501..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ApplicationTerminatedEvent.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.messaging.event.application.status;
-
-import org.apache.stratos.messaging.domain.topology.ClusterDataHolder;
-
-import java.io.Serializable;
-import java.util.Set;
-
-/**
- * This event will be fired upon the application terminated is detected.
- */
-public class ApplicationTerminatedEvent extends StatusEvent implements Serializable {
-    private static final long serialVersionUID = 2625412714611885089L;
-
-    private String appId;
-    private Set<ClusterDataHolder> clusterData;
-
-    public ApplicationTerminatedEvent(String appId, Set<ClusterDataHolder> clusterData) {
-        this.appId = appId;
-        this.clusterData = clusterData;
-    }
-
-    public String getAppId() {
-        return appId;
-    }
-
-    public Set<ClusterDataHolder> getClusterData() {
-        return clusterData;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ApplicationTerminatingEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ApplicationTerminatingEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ApplicationTerminatingEvent.java
deleted file mode 100644
index 9d3f966..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ApplicationTerminatingEvent.java
+++ /dev/null
@@ -1,38 +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.messaging.event.application.status;
-
-import java.io.Serializable;
-
-/**
- * This event will be fired upon the application terminating is detected.
- */
-public class ApplicationTerminatingEvent extends StatusEvent implements Serializable {
-    private static final long serialVersionUID = 2625412714611885089L;
-
-    private String appId;
-
-    public ApplicationTerminatingEvent(String appId) {
-        this.appId = appId;
-    }
-
-    public String getAppId() {
-        return appId;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ClusterActivatedEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ClusterActivatedEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ClusterActivatedEvent.java
deleted file mode 100644
index c1434dd..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ClusterActivatedEvent.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.messaging.event.application.status;
-
-import java.io.Serializable;
-
-/**
- * This event is fired by cartridge agent when it has started the server and
- * applications are ready to serve the incoming requests.
- */
-public class ClusterActivatedEvent extends StatusEvent {
-    private static final long serialVersionUID = 2625412714611885089L;
-
-    private final String serviceName;
-    private final String clusterId;
-    private String appId;
-
-    public ClusterActivatedEvent(String appId, String serviceName, String clusterId) {
-        this.serviceName = serviceName;
-        this.clusterId = clusterId;
-        this.appId = appId;
-    }
-
-    public String getServiceName() {
-        return serviceName;
-    }
-
-    public String getClusterId() {
-        return clusterId;
-    }
-
-    public String getAppId() {
-        return appId;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ClusterInActivateEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ClusterInActivateEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ClusterInActivateEvent.java
deleted file mode 100644
index e2a5887..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ClusterInActivateEvent.java
+++ /dev/null
@@ -1,50 +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.messaging.event.application.status;
-
-/**
- * This event is fired by cartridge agent when it has started the server and
- * applications are ready to serve the incoming requests.
- */
-public class ClusterInActivateEvent extends StatusEvent {
-    private static final long serialVersionUID = 2625412714611885089L;
-
-    private final String serviceName;
-    private final String clusterId;
-    private String appId;
-
-    public ClusterInActivateEvent(String appId, String serviceName, String clusterId) {
-        this.serviceName = serviceName;
-        this.clusterId = clusterId;
-        this.appId = appId;
-    }
-
-    public String getServiceName() {
-        return serviceName;
-    }
-
-    public String getClusterId() {
-        return clusterId;
-    }
-
-    public String getAppId() {
-        return appId;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ClusterMaintenanceModeEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ClusterMaintenanceModeEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ClusterMaintenanceModeEvent.java
deleted file mode 100644
index b9f6158..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ClusterMaintenanceModeEvent.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.messaging.event.application.status;
-
-import java.io.Serializable;
-
-/**
- * This will be fired upon the cluster instability detection by either cep/autoscaler.
- */
-public class ClusterMaintenanceModeEvent extends StatusEvent implements Serializable {
-    private final String serviceName;
-    private final String clusterId;
-    private String appId;
-
-    public ClusterMaintenanceModeEvent(String appId, String serviceName, String clusterId) {
-        this.serviceName = serviceName;
-        this.clusterId = clusterId;
-        this.appId = appId;
-    }
-
-    public String getServiceName() {
-        return serviceName;
-    }
-
-    public String getClusterId() {
-        return clusterId;
-    }
-
-
-    public String getAppId() {
-        return appId;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ClusterReadyToShutdownEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ClusterReadyToShutdownEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ClusterReadyToShutdownEvent.java
deleted file mode 100644
index b76bb7e..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/ClusterReadyToShutdownEvent.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.messaging.event.application.status;
-
-/**
- * This event is fired by autoscaler before actually terminate a cluster.
- */
-public class ClusterReadyToShutdownEvent extends StatusEvent {
-    private final String serviceName;
-    private final String clusterId;
-    private String appId;
-
-    public ClusterReadyToShutdownEvent(String appId, String serviceName, String clusterId) {
-        this.serviceName = serviceName;
-        this.clusterId = clusterId;
-        this.appId = appId;
-    }
-
-    public String getServiceName() {
-        return serviceName;
-    }
-
-    public String getClusterId() {
-        return clusterId;
-    }
-
-
-    public String getAppId() {
-        return appId;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/GroupActivatedEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/GroupActivatedEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/GroupActivatedEvent.java
deleted file mode 100644
index 2357881..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/GroupActivatedEvent.java
+++ /dev/null
@@ -1,44 +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.messaging.event.application.status;
-
-/**
- * This event is fired by cartridge agent when it has started the server and
- * applications are ready to serve the incoming requests.
- */
-public class GroupActivatedEvent extends StatusEvent {
-    private static final long serialVersionUID = 2625412714611885089L;
-
-    private String groupId;
-    private String appId;
-
-    public GroupActivatedEvent(String appId, String groupId) {
-        this.appId = appId;
-        this.groupId = groupId;
-    }
-
-    public String getGroupId() {
-        return this.groupId;
-    }
-
-    public String getAppId() {
-        return appId;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/GroupInTerminatedEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/GroupInTerminatedEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/GroupInTerminatedEvent.java
deleted file mode 100644
index 16cc0c7..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/GroupInTerminatedEvent.java
+++ /dev/null
@@ -1,44 +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.messaging.event.application.status;
-
-/**
- * This event is fired by cartridge agent when it has started the server and
- * applications are ready to serve the incoming requests.
- */
-public class GroupInTerminatedEvent extends StatusEvent {
-    private static final long serialVersionUID = 2625412714611885089L;
-
-    private String groupId;
-    private String appId;
-
-    public GroupInTerminatedEvent(String appId, String groupId) {
-        this.appId = appId;
-        this.groupId = groupId;
-    }
-
-    public String getGroupId() {
-        return this.groupId;
-    }
-
-    public String getAppId() {
-        return appId;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/GroupInTerminatingEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/GroupInTerminatingEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/GroupInTerminatingEvent.java
deleted file mode 100644
index 6eaf5c3..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/GroupInTerminatingEvent.java
+++ /dev/null
@@ -1,44 +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.messaging.event.application.status;
-
-/**
- * This event is fired by cartridge agent when it has started the server and
- * applications are ready to serve the incoming requests.
- */
-public class GroupInTerminatingEvent extends StatusEvent {
-    private static final long serialVersionUID = 2625412714611885089L;
-
-    private String groupId;
-    private String appId;
-
-    public GroupInTerminatingEvent(String appId, String groupId) {
-        this.appId = appId;
-        this.groupId = groupId;
-    }
-
-    public String getGroupId() {
-        return this.groupId;
-    }
-
-    public String getAppId() {
-        return appId;
-    }
-}


[2/3] rename application status events, listeners and processors with prefix appstatus

Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/GroupInactivateEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/GroupInactivateEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/GroupInactivateEvent.java
deleted file mode 100644
index e816480..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/GroupInactivateEvent.java
+++ /dev/null
@@ -1,44 +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.messaging.event.application.status;
-
-/**
- * This event is fired by cartridge agent when it has started the server and
- * applications are ready to serve the incoming requests.
- */
-public class GroupInactivateEvent extends StatusEvent {
-    private static final long serialVersionUID = 2625412714611885089L;
-
-    private String groupId;
-    private String appId;
-
-    public GroupInactivateEvent(String appId, String groupId) {
-        this.appId = appId;
-        this.groupId = groupId;
-    }
-
-    public String getGroupId() {
-        return this.groupId;
-    }
-
-    public String getAppId() {
-        return appId;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/GroupMaintenanceModeEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/GroupMaintenanceModeEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/GroupMaintenanceModeEvent.java
deleted file mode 100644
index 5e6534d..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/GroupMaintenanceModeEvent.java
+++ /dev/null
@@ -1,41 +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.messaging.event.application.status;
-
-/**
- * This event will be fired upon the instability of group detection by autoscaler.
- */
-public class GroupMaintenanceModeEvent extends StatusEvent {
-    private String groupId;
-    private String appId;
-
-    public GroupMaintenanceModeEvent(String appId, String groupId) {
-        this.appId = appId;
-        this.groupId = groupId;
-    }
-
-    public String getGroupId(String groupId) {
-        return this.groupId;
-    }
-
-    public String getAppId() {
-        return appId;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/GroupReadyToShutdownEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/GroupReadyToShutdownEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/GroupReadyToShutdownEvent.java
deleted file mode 100644
index d1ed012..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/status/GroupReadyToShutdownEvent.java
+++ /dev/null
@@ -1,40 +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.messaging.event.application.status;
-
-/**
- * This event is fired by autoscaler before actually terminate a group.
- */
-public class GroupReadyToShutdownEvent extends StatusEvent {
-    private String groupId;
-    private String appId;
-
-    public GroupReadyToShutdownEvent(String appId, String groupId) {
-        this.appId = appId;
-        this.groupId = groupId;
-    }
-
-    public String getGroupId(String groupId) {
-        return this.groupId;
-    }
-
-    public String getAppId() {
-        return appId;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusApplicationActivatedEventListener.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusApplicationActivatedEventListener.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusApplicationActivatedEventListener.java
new file mode 100644
index 0000000..4dfc8b5
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusApplicationActivatedEventListener.java
@@ -0,0 +1,27 @@
+/*
+ * 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.messaging.listener.application.status;
+
+import org.apache.stratos.messaging.listener.EventListener;
+
+/**
+ * This listener will get triggered upon the application activated event.
+ */
+public abstract class AppStatusApplicationActivatedEventListener extends EventListener {
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusApplicationCreatedEventListener.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusApplicationCreatedEventListener.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusApplicationCreatedEventListener.java
new file mode 100644
index 0000000..79a7d21
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusApplicationCreatedEventListener.java
@@ -0,0 +1,27 @@
+/*
+ * 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.messaging.listener.application.status;
+
+import org.apache.stratos.messaging.listener.EventListener;
+
+/**
+ * This listener will get triggered upon the application created event.
+ */
+public abstract class AppStatusApplicationCreatedEventListener extends EventListener {
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusApplicationInactivatedEventListener.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusApplicationInactivatedEventListener.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusApplicationInactivatedEventListener.java
new file mode 100644
index 0000000..c2a356d
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusApplicationInactivatedEventListener.java
@@ -0,0 +1,27 @@
+/*
+ * 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.messaging.listener.application.status;
+
+import org.apache.stratos.messaging.listener.EventListener;
+
+/**
+ * This listener will get triggered upon the application inactivated event.
+ */
+public abstract class AppStatusApplicationInactivatedEventListener extends EventListener {
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusApplicationTerminatedEventListener.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusApplicationTerminatedEventListener.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusApplicationTerminatedEventListener.java
new file mode 100644
index 0000000..ad1be52
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusApplicationTerminatedEventListener.java
@@ -0,0 +1,27 @@
+/*
+ * 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.messaging.listener.application.status;
+
+import org.apache.stratos.messaging.listener.EventListener;
+
+/**
+ * This listener will get triggered upon the application terminated event.
+ */
+public abstract class AppStatusApplicationTerminatedEventListener extends EventListener {
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusApplicationTerminatingEventListener.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusApplicationTerminatingEventListener.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusApplicationTerminatingEventListener.java
new file mode 100644
index 0000000..a454f16
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusApplicationTerminatingEventListener.java
@@ -0,0 +1,27 @@
+/*
+ * 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.messaging.listener.application.status;
+
+import org.apache.stratos.messaging.listener.EventListener;
+
+/**
+ * This listener will get triggered upon the application terminating event.
+ */
+public abstract class AppStatusApplicationTerminatingEventListener extends EventListener {
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusClusterActivatedEventListener.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusClusterActivatedEventListener.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusClusterActivatedEventListener.java
new file mode 100644
index 0000000..75da7b8
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusClusterActivatedEventListener.java
@@ -0,0 +1,24 @@
+/*
+ * 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.messaging.listener.application.status;
+
+import org.apache.stratos.messaging.listener.EventListener;
+
+public abstract class AppStatusClusterActivatedEventListener extends EventListener{
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusClusterInactivateEventListener.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusClusterInactivateEventListener.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusClusterInactivateEventListener.java
new file mode 100644
index 0000000..03da7f7
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusClusterInactivateEventListener.java
@@ -0,0 +1,24 @@
+/*
+ * 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.messaging.listener.application.status;
+
+import org.apache.stratos.messaging.listener.EventListener;
+
+public abstract class AppStatusClusterInactivateEventListener extends EventListener{
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusGroupActivatedEventListener.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusGroupActivatedEventListener.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusGroupActivatedEventListener.java
new file mode 100644
index 0000000..75fe2c9
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusGroupActivatedEventListener.java
@@ -0,0 +1,27 @@
+/*
+ * 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.messaging.listener.application.status;
+
+import org.apache.stratos.messaging.listener.EventListener;
+
+/**
+ * Created by reka on 9/22/14.
+ */
+public abstract class AppStatusGroupActivatedEventListener extends EventListener {
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusGroupInactivateEventListener.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusGroupInactivateEventListener.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusGroupInactivateEventListener.java
new file mode 100644
index 0000000..5c88fae
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusGroupInactivateEventListener.java
@@ -0,0 +1,27 @@
+/*
+ * 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.messaging.listener.application.status;
+
+import org.apache.stratos.messaging.listener.EventListener;
+
+/**
+ * Created by reka on 9/22/14.
+ */
+public abstract class AppStatusGroupInactivateEventListener extends EventListener {
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusGroupTerminatedEventListener.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusGroupTerminatedEventListener.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusGroupTerminatedEventListener.java
new file mode 100644
index 0000000..785abbd
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusGroupTerminatedEventListener.java
@@ -0,0 +1,24 @@
+/*
+ * 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.messaging.listener.application.status;
+
+import org.apache.stratos.messaging.listener.EventListener;
+
+public abstract class AppStatusGroupTerminatedEventListener extends EventListener {
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusGroupTerminatingEventListener.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusGroupTerminatingEventListener.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusGroupTerminatingEventListener.java
new file mode 100644
index 0000000..fbd7fcc
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/AppStatusGroupTerminatingEventListener.java
@@ -0,0 +1,27 @@
+/*
+ * 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.messaging.listener.application.status;
+
+import org.apache.stratos.messaging.listener.EventListener;
+
+/**
+ * Created by reka on 9/22/14.
+ */
+public abstract class AppStatusGroupTerminatingEventListener extends EventListener {
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ApplicationActivatedEventListener.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ApplicationActivatedEventListener.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ApplicationActivatedEventListener.java
deleted file mode 100644
index 22f2ac1..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ApplicationActivatedEventListener.java
+++ /dev/null
@@ -1,27 +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.messaging.listener.application.status;
-
-import org.apache.stratos.messaging.listener.EventListener;
-
-/**
- * This listener will get triggered upon the application activated event.
- */
-public abstract class ApplicationActivatedEventListener extends EventListener {
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ApplicationCreatedEventListener.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ApplicationCreatedEventListener.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ApplicationCreatedEventListener.java
deleted file mode 100644
index cbeffa8..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ApplicationCreatedEventListener.java
+++ /dev/null
@@ -1,27 +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.messaging.listener.application.status;
-
-import org.apache.stratos.messaging.listener.EventListener;
-
-/**
- * This listener will get triggered upon the application created event.
- */
-public abstract class ApplicationCreatedEventListener extends EventListener {
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ApplicationInActivatedEventListener.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ApplicationInActivatedEventListener.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ApplicationInActivatedEventListener.java
deleted file mode 100644
index eecf941..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ApplicationInActivatedEventListener.java
+++ /dev/null
@@ -1,27 +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.messaging.listener.application.status;
-
-import org.apache.stratos.messaging.listener.EventListener;
-
-/**
- * This listener will get triggered upon the application inactivated event.
- */
-public abstract class ApplicationInActivatedEventListener extends EventListener {
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ApplicationTerminatedEventListener.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ApplicationTerminatedEventListener.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ApplicationTerminatedEventListener.java
deleted file mode 100644
index aacde3b..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ApplicationTerminatedEventListener.java
+++ /dev/null
@@ -1,27 +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.messaging.listener.application.status;
-
-import org.apache.stratos.messaging.listener.EventListener;
-
-/**
- * This listener will get triggered upon the application terminated event.
- */
-public abstract class ApplicationTerminatedEventListener extends EventListener {
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ApplicationTerminatingEventListener.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ApplicationTerminatingEventListener.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ApplicationTerminatingEventListener.java
deleted file mode 100644
index b35984b..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ApplicationTerminatingEventListener.java
+++ /dev/null
@@ -1,27 +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.messaging.listener.application.status;
-
-import org.apache.stratos.messaging.listener.EventListener;
-
-/**
- * This listener will get triggered upon the application terminating event.
- */
-public abstract class ApplicationTerminatingEventListener extends EventListener {
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ClusterActivatedEventListener.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ClusterActivatedEventListener.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ClusterActivatedEventListener.java
deleted file mode 100644
index 383b379..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ClusterActivatedEventListener.java
+++ /dev/null
@@ -1,24 +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.messaging.listener.application.status;
-
-import org.apache.stratos.messaging.listener.EventListener;
-
-public abstract class ClusterActivatedEventListener extends EventListener{
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ClusterInActivateEventListener.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ClusterInActivateEventListener.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ClusterInActivateEventListener.java
deleted file mode 100644
index 2ae7335..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/ClusterInActivateEventListener.java
+++ /dev/null
@@ -1,24 +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.messaging.listener.application.status;
-
-import org.apache.stratos.messaging.listener.EventListener;
-
-public abstract class ClusterInActivateEventListener extends EventListener{
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/GroupActivatedEventListener.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/GroupActivatedEventListener.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/GroupActivatedEventListener.java
deleted file mode 100644
index 83e5a7a..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/GroupActivatedEventListener.java
+++ /dev/null
@@ -1,27 +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.messaging.listener.application.status;
-
-import org.apache.stratos.messaging.listener.EventListener;
-
-/**
- * Created by reka on 9/22/14.
- */
-public abstract class GroupActivatedEventListener extends EventListener {
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/GroupInactivateEventListener.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/GroupInactivateEventListener.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/GroupInactivateEventListener.java
deleted file mode 100644
index bcca3fd..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/GroupInactivateEventListener.java
+++ /dev/null
@@ -1,27 +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.messaging.listener.application.status;
-
-import org.apache.stratos.messaging.listener.EventListener;
-
-/**
- * Created by reka on 9/22/14.
- */
-public abstract class GroupInactivateEventListener extends EventListener {
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/GroupTerminatedEventListener.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/GroupTerminatedEventListener.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/GroupTerminatedEventListener.java
deleted file mode 100644
index 6572516..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/GroupTerminatedEventListener.java
+++ /dev/null
@@ -1,24 +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.messaging.listener.application.status;
-
-import org.apache.stratos.messaging.listener.EventListener;
-
-public abstract class GroupTerminatedEventListener extends EventListener {
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/GroupTerminatingEventListener.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/GroupTerminatingEventListener.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/GroupTerminatingEventListener.java
deleted file mode 100644
index afb65b8..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/status/GroupTerminatingEventListener.java
+++ /dev/null
@@ -1,27 +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.messaging.listener.application.status;
-
-import org.apache.stratos.messaging.listener.EventListener;
-
-/**
- * Created by reka on 9/22/14.
- */
-public abstract class GroupTerminatingEventListener extends EventListener {
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusApplicationActivatedMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusApplicationActivatedMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusApplicationActivatedMessageProcessor.java
new file mode 100644
index 0000000..a505624
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusApplicationActivatedMessageProcessor.java
@@ -0,0 +1,65 @@
+/*
+ * 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.messaging.message.processor.application.status;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.messaging.event.application.status.AppStatusApplicationActivatedEvent;
+import org.apache.stratos.messaging.message.processor.MessageProcessor;
+import org.apache.stratos.messaging.util.Util;
+
+/**
+ * Created by reka on 9/25/14.
+ */
+public class AppStatusApplicationActivatedMessageProcessor extends MessageProcessor {
+    private static final Log log =
+            LogFactory.getLog(AppStatusApplicationActivatedMessageProcessor.class);
+
+
+    private MessageProcessor nextProcessor;
+    @Override
+    public void setNext(MessageProcessor nextProcessor) {
+        this.nextProcessor = nextProcessor;
+
+    }
+
+    @Override
+    public boolean process(String type, String message, Object object) {
+        if (AppStatusApplicationActivatedEvent.class.getName().equals(type)) {
+            // Parse complete message and build event
+            AppStatusApplicationActivatedEvent event =
+                    (AppStatusApplicationActivatedEvent) Util.jsonToObject(message, AppStatusApplicationActivatedEvent.class);
+
+            if (log.isDebugEnabled()) {
+                log.debug("Received ApplicationActivatedEvent in application status topic: " + event.toString());
+            }
+            // Notify event listeners
+            notifyEventListeners(event);
+            return true;
+        } else {
+            if (nextProcessor != null) {
+                return nextProcessor.process(type, message, object);
+            } else {
+                throw new RuntimeException(
+                        String.format("Failed to process group activated message " +
+                                "using available message processors: [type] %s [body] %s", type, message));
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusApplicationCreatedMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusApplicationCreatedMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusApplicationCreatedMessageProcessor.java
new file mode 100644
index 0000000..4e2f97f
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusApplicationCreatedMessageProcessor.java
@@ -0,0 +1,63 @@
+/*
+ * 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.messaging.message.processor.application.status;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.messaging.event.topology.ApplicationCreatedEvent;
+import org.apache.stratos.messaging.message.processor.MessageProcessor;
+import org.apache.stratos.messaging.util.Util;
+
+public class AppStatusApplicationCreatedMessageProcessor extends MessageProcessor {
+    private static final Log log =
+            LogFactory.getLog(AppStatusApplicationCreatedMessageProcessor.class);
+
+
+    private MessageProcessor nextProcessor;
+
+    @Override
+    public void setNext(MessageProcessor nextProcessor) {
+        this.nextProcessor = nextProcessor;
+
+    }
+
+    @Override
+    public boolean process(String type, String message, Object object) {
+        if (ApplicationCreatedEvent.class.getName().equals(type)) {
+            // Parse complete message and build event
+            ApplicationCreatedEvent event =
+                    (ApplicationCreatedEvent) Util.jsonToObject(message, ApplicationCreatedEvent.class);
+
+            if (log.isDebugEnabled()) {
+                log.debug("Received ApplicationCreated Event in application status topic: " + event.toString());
+            }
+            // Notify event listeners
+            notifyEventListeners(event);
+            return true;
+        } else {
+            if (nextProcessor != null) {
+                return nextProcessor.process(type, message, object);
+            } else {
+                throw new RuntimeException(
+                        String.format("Failed to process group activated message " +
+                                "using available message processors: [type] %s [body] %s", type, message));
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusApplicationInactivatedMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusApplicationInactivatedMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusApplicationInactivatedMessageProcessor.java
new file mode 100644
index 0000000..972fca3
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusApplicationInactivatedMessageProcessor.java
@@ -0,0 +1,63 @@
+/*
+ * 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.messaging.message.processor.application.status;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.messaging.event.application.status.AppStatusApplicationInactivatedEvent;
+import org.apache.stratos.messaging.message.processor.MessageProcessor;
+import org.apache.stratos.messaging.util.Util;
+
+public class AppStatusApplicationInactivatedMessageProcessor extends MessageProcessor {
+    private static final Log log =
+            LogFactory.getLog(AppStatusApplicationInactivatedMessageProcessor.class);
+
+
+    private MessageProcessor nextProcessor;
+
+    @Override
+    public void setNext(MessageProcessor nextProcessor) {
+        this.nextProcessor = nextProcessor;
+
+    }
+
+    @Override
+    public boolean process(String type, String message, Object object) {
+        if (AppStatusApplicationInactivatedEvent.class.getName().equals(type)) {
+            // Parse complete message and build event
+            AppStatusApplicationInactivatedEvent event =
+                    (AppStatusApplicationInactivatedEvent) Util.jsonToObject(message, AppStatusApplicationInactivatedEvent.class);
+
+            if (log.isDebugEnabled()) {
+                log.debug("Received ApplicationInActivatedEvent in application status topic: " + event.toString());
+            }
+            // Notify event listeners
+            notifyEventListeners(event);
+            return true;
+        } else {
+            if (nextProcessor != null) {
+                return nextProcessor.process(type, message, object);
+            } else {
+                throw new RuntimeException(
+                        String.format("Failed to process group activated message " +
+                                "using available message processors: [type] %s [body] %s", type, message));
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusApplicationTerminatedMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusApplicationTerminatedMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusApplicationTerminatedMessageProcessor.java
new file mode 100644
index 0000000..b639ac0
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusApplicationTerminatedMessageProcessor.java
@@ -0,0 +1,63 @@
+/*
+ * 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.messaging.message.processor.application.status;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.messaging.event.application.status.AppStatusApplicationTerminatedEvent;
+import org.apache.stratos.messaging.message.processor.MessageProcessor;
+import org.apache.stratos.messaging.util.Util;
+
+public class AppStatusApplicationTerminatedMessageProcessor extends MessageProcessor {
+    private static final Log log =
+            LogFactory.getLog(AppStatusApplicationTerminatedMessageProcessor.class);
+
+
+    private MessageProcessor nextProcessor;
+
+    @Override
+    public void setNext(MessageProcessor nextProcessor) {
+        this.nextProcessor = nextProcessor;
+
+    }
+
+    @Override
+    public boolean process(String type, String message, Object object) {
+        if (AppStatusApplicationTerminatedEvent.class.getName().equals(type)) {
+            // Parse complete message and build event
+            AppStatusApplicationTerminatedEvent event =
+                    (AppStatusApplicationTerminatedEvent) Util.jsonToObject(message, AppStatusApplicationTerminatedEvent.class);
+
+            if (log.isDebugEnabled()) {
+                log.debug("Received ApplicationTerminatedEvent in application status topic: " + event.toString());
+            }
+            // Notify event listeners
+            notifyEventListeners(event);
+            return true;
+        } else {
+            if (nextProcessor != null) {
+                return nextProcessor.process(type, message, object);
+            } else {
+                throw new RuntimeException(
+                        String.format("Failed to process group activated message " +
+                                "using available message processors: [type] %s [body] %s", type, message));
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusApplicationTerminatingMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusApplicationTerminatingMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusApplicationTerminatingMessageProcessor.java
new file mode 100644
index 0000000..143565a
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusApplicationTerminatingMessageProcessor.java
@@ -0,0 +1,63 @@
+/*
+ * 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.messaging.message.processor.application.status;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.messaging.event.application.status.AppStatusApplicationTerminatingEvent;
+import org.apache.stratos.messaging.message.processor.MessageProcessor;
+import org.apache.stratos.messaging.util.Util;
+
+public class AppStatusApplicationTerminatingMessageProcessor extends MessageProcessor {
+    private static final Log log =
+            LogFactory.getLog(AppStatusApplicationTerminatingMessageProcessor.class);
+
+
+    private MessageProcessor nextProcessor;
+
+    @Override
+    public void setNext(MessageProcessor nextProcessor) {
+        this.nextProcessor = nextProcessor;
+
+    }
+
+    @Override
+    public boolean process(String type, String message, Object object) {
+        if (AppStatusApplicationTerminatingEvent.class.getName().equals(type)) {
+            // Parse complete message and build event
+            AppStatusApplicationTerminatingEvent event =
+                    (AppStatusApplicationTerminatingEvent) Util.jsonToObject(message, AppStatusApplicationTerminatingEvent.class);
+
+            if (log.isDebugEnabled()) {
+                log.debug("Received ApplicationTerminatingEvent in application status topic: " + event.toString());
+            }
+            // Notify event listeners
+            notifyEventListeners(event);
+            return true;
+        } else {
+            if (nextProcessor != null) {
+                return nextProcessor.process(type, message, object);
+            } else {
+                throw new RuntimeException(
+                        String.format("Failed to process group activated message " +
+                                "using available message processors: [type] %s [body] %s", type, message));
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusClusterActivatedMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusClusterActivatedMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusClusterActivatedMessageProcessor.java
new file mode 100644
index 0000000..3f3c6eb
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusClusterActivatedMessageProcessor.java
@@ -0,0 +1,57 @@
+/*
+ * 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.messaging.message.processor.application.status;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.messaging.event.application.status.AppStatusClusterActivatedEvent;
+import org.apache.stratos.messaging.message.processor.MessageProcessor;
+import org.apache.stratos.messaging.util.Util;
+
+
+public class AppStatusClusterActivatedMessageProcessor extends MessageProcessor {
+    private static final Log log = LogFactory.getLog(AppStatusClusterActivatedMessageProcessor.class);
+    private MessageProcessor nextProcessor;
+
+    @Override
+    public void setNext(MessageProcessor nextProcessor) {
+        this.nextProcessor = nextProcessor;
+    }
+
+    @Override
+    public boolean process(String type, String message, Object object) {
+        if (AppStatusClusterActivatedEvent.class.getName().equals(type)) {
+            // Parse complete message and build event
+            AppStatusClusterActivatedEvent event = (AppStatusClusterActivatedEvent) Util.jsonToObject(message, AppStatusClusterActivatedEvent.class);
+
+            if(log.isDebugEnabled()) {
+                log.debug("Received ClusterActivatedEvent: " + event.toString());
+            }
+            // Notify event listeners
+            notifyEventListeners(event);
+            return true;
+        } else {
+            if (nextProcessor != null) {
+                return nextProcessor.process(type, message, object);
+            } else {
+                throw new RuntimeException(String.format("Failed to process cluster activated message using available message processors: [type] %s [body] %s", type, message));
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusClusterInactivateMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusClusterInactivateMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusClusterInactivateMessageProcessor.java
new file mode 100644
index 0000000..6e28972
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusClusterInactivateMessageProcessor.java
@@ -0,0 +1,58 @@
+/*
+ * 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.messaging.message.processor.application.status;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.messaging.event.application.status.AppStatusClusterInactivateEvent;
+import org.apache.stratos.messaging.message.processor.MessageProcessor;
+import org.apache.stratos.messaging.util.Util;
+
+
+public class AppStatusClusterInactivateMessageProcessor extends MessageProcessor {
+    private static final Log log = LogFactory.getLog(AppStatusClusterInactivateMessageProcessor.class);
+    private MessageProcessor nextProcessor;
+
+    @Override
+    public void setNext(MessageProcessor nextProcessor) {
+        this.nextProcessor = nextProcessor;
+    }
+
+    @Override
+    public boolean process(String type, String message, Object object) {
+        if (AppStatusClusterInactivateEvent.class.getName().equals(type)) {
+            // Parse complete message and build event
+            AppStatusClusterInactivateEvent event = (AppStatusClusterInactivateEvent) Util.
+                                                jsonToObject(message, AppStatusClusterInactivateEvent.class);
+
+            if(log.isDebugEnabled()) {
+                log.debug("Received ClusterInActivateEvent: " + event.toString());
+            }
+            // Notify event listeners
+            notifyEventListeners(event);
+            return true;
+        } else {
+            if (nextProcessor != null) {
+                return nextProcessor.process(type, message, object);
+            } else {
+                throw new RuntimeException(String.format("Failed to process cluster activated message using available message processors: [type] %s [body] %s", type, message));
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusGroupActivatedMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusGroupActivatedMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusGroupActivatedMessageProcessor.java
new file mode 100644
index 0000000..473726c
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusGroupActivatedMessageProcessor.java
@@ -0,0 +1,61 @@
+/*
+ * 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.messaging.message.processor.application.status;
+
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.messaging.event.application.status.AppStatusGroupActivatedEvent;
+import org.apache.stratos.messaging.message.processor.MessageProcessor;
+import org.apache.stratos.messaging.util.Util;
+
+public class AppStatusGroupActivatedMessageProcessor extends MessageProcessor {
+    private static final Log log =
+            LogFactory.getLog(AppStatusGroupActivatedMessageProcessor.class);
+    private MessageProcessor nextProcessor;
+
+    @Override
+    public void setNext(MessageProcessor nextProcessor) {
+        this.nextProcessor = nextProcessor;
+    }
+
+    @Override
+    public boolean process(String type, String message, Object object) {
+        if (AppStatusGroupActivatedEvent.class.getName().equals(type)) {
+            // Parse complete message and build event
+            AppStatusGroupActivatedEvent event =
+                    (AppStatusGroupActivatedEvent) Util.jsonToObject(message, AppStatusGroupActivatedEvent.class);
+
+            if (log.isDebugEnabled()) {
+                log.debug("Received GroupActivatedEvent: " + event.toString());
+            }
+            // Notify event listeners
+            notifyEventListeners(event);
+            return true;
+        } else {
+            if (nextProcessor != null) {
+                return nextProcessor.process(type, message, object);
+            } else {
+                throw new RuntimeException(
+                        String.format("Failed to process group activated message " +
+                                "using available message processors: [type] %s [body] %s", type, message));
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusGroupInactivatedMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusGroupInactivatedMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusGroupInactivatedMessageProcessor.java
new file mode 100644
index 0000000..714ee88
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusGroupInactivatedMessageProcessor.java
@@ -0,0 +1,61 @@
+/*
+ * 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.messaging.message.processor.application.status;
+
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.messaging.event.application.status.AppStatusGroupInactivateEvent;
+import org.apache.stratos.messaging.message.processor.MessageProcessor;
+import org.apache.stratos.messaging.util.Util;
+
+public class AppStatusGroupInactivatedMessageProcessor extends MessageProcessor {
+    private static final Log log =
+            LogFactory.getLog(AppStatusGroupInactivatedMessageProcessor.class);
+    private MessageProcessor nextProcessor;
+
+    @Override
+    public void setNext(MessageProcessor nextProcessor) {
+        this.nextProcessor = nextProcessor;
+    }
+
+    @Override
+    public boolean process(String type, String message, Object object) {
+        if (AppStatusGroupInactivateEvent.class.getName().equals(type)) {
+            // Parse complete message and build event
+            AppStatusGroupInactivateEvent event =
+                    (AppStatusGroupInactivateEvent) Util.jsonToObject(message, AppStatusGroupInactivateEvent.class);
+
+            if (log.isDebugEnabled()) {
+                log.debug("Received GroupInActivateEvent: " + event.toString());
+            }
+            // Notify event listeners
+            notifyEventListeners(event);
+            return true;
+        } else {
+            if (nextProcessor != null) {
+                return nextProcessor.process(type, message, object);
+            } else {
+                throw new RuntimeException(
+                        String.format("Failed to process group in activated message " +
+                                "using available message processors: [type] %s [body] %s", type, message));
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusGroupTerminatedMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusGroupTerminatedMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusGroupTerminatedMessageProcessor.java
new file mode 100644
index 0000000..daa7206
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusGroupTerminatedMessageProcessor.java
@@ -0,0 +1,61 @@
+/*
+ * 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.messaging.message.processor.application.status;
+
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.messaging.event.application.status.AppStatusGroupTerminatedEvent;
+import org.apache.stratos.messaging.message.processor.MessageProcessor;
+import org.apache.stratos.messaging.util.Util;
+
+public class AppStatusGroupTerminatedMessageProcessor extends MessageProcessor {
+    private static final Log log =
+            LogFactory.getLog(AppStatusGroupTerminatedMessageProcessor.class);
+    private MessageProcessor nextProcessor;
+
+    @Override
+    public void setNext(MessageProcessor nextProcessor) {
+        this.nextProcessor = nextProcessor;
+    }
+
+    @Override
+    public boolean process(String type, String message, Object object) {
+        if (AppStatusGroupTerminatedEvent.class.getName().equals(type)) {
+            // Parse complete message and build event
+            AppStatusGroupTerminatedEvent event =
+                    (AppStatusGroupTerminatedEvent) Util.jsonToObject(message, AppStatusGroupTerminatedEvent.class);
+
+            if (log.isDebugEnabled()) {
+                log.debug("Received GroupTerminatingEvent: " + event.toString());
+            }
+            // Notify event listeners
+            notifyEventListeners(event);
+            return true;
+        } else {
+            if (nextProcessor != null) {
+                return nextProcessor.process(type, message, object);
+            } else {
+                throw new RuntimeException(
+                        String.format("Failed to process group in GroupTerminatingEvent message " +
+                                "using available message processors: [type] %s [body] %s", type, message));
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4ba5b3/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusGroupTerminatingMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusGroupTerminatingMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusGroupTerminatingMessageProcessor.java
new file mode 100644
index 0000000..7445695
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/status/AppStatusGroupTerminatingMessageProcessor.java
@@ -0,0 +1,61 @@
+/*
+ * 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.messaging.message.processor.application.status;
+
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.messaging.event.topology.GroupTerminatingEvent;
+import org.apache.stratos.messaging.message.processor.MessageProcessor;
+import org.apache.stratos.messaging.util.Util;
+
+public class AppStatusGroupTerminatingMessageProcessor extends MessageProcessor {
+    private static final Log log =
+            LogFactory.getLog(AppStatusGroupTerminatingMessageProcessor.class);
+    private MessageProcessor nextProcessor;
+
+    @Override
+    public void setNext(MessageProcessor nextProcessor) {
+        this.nextProcessor = nextProcessor;
+    }
+
+    @Override
+    public boolean process(String type, String message, Object object) {
+        if (GroupTerminatingEvent.class.getName().equals(type)) {
+            // Parse complete message and build event
+            GroupTerminatingEvent event =
+                    (GroupTerminatingEvent) Util.jsonToObject(message, GroupTerminatingEvent.class);
+
+            if (log.isDebugEnabled()) {
+                log.debug("Received GroupTerminatingEvent: " + event.toString());
+            }
+            // Notify event listeners
+            notifyEventListeners(event);
+            return true;
+        } else {
+            if (nextProcessor != null) {
+                return nextProcessor.process(type, message, object);
+            } else {
+                throw new RuntimeException(
+                        String.format("Failed to process group in GroupTerminatingEvent message " +
+                                "using available message processors: [type] %s [body] %s", type, message));
+            }
+        }
+    }
+}