You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by re...@apache.org on 2014/10/24 07:39:29 UTC
git commit: fixing STRATOS-908
Repository: stratos
Updated Branches:
refs/heads/4.0.0-grouping c6cadf0bf -> 928969d43
fixing STRATOS-908
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/928969d4
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/928969d4
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/928969d4
Branch: refs/heads/4.0.0-grouping
Commit: 928969d436972266f4d6b4208bb69ecbe94c3568
Parents: c6cadf0
Author: reka <rt...@gmail.com>
Authored: Fri Oct 24 11:09:14 2014 +0530
Committer: reka <rt...@gmail.com>
Committed: Fri Oct 24 11:09:14 2014 +0530
----------------------------------------------------------------------
.../AutoscalerTopologyEventReceiver.java | 11 ++++----
.../ApplicationInActivateEventListener.java | 27 ++++++++++++++++++++
.../ApplicationTerminatedEventListener.java | 27 ++++++++++++++++++++
.../ApplicationTerminatingEventListener.java | 27 ++++++++++++++++++++
.../topology/TopologyMessageProcessorChain.java | 5 +---
5 files changed, 88 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/928969d4/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/topology/AutoscalerTopologyEventReceiver.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/topology/AutoscalerTopologyEventReceiver.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/topology/AutoscalerTopologyEventReceiver.java
index 9e7c769..93b3123 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/topology/AutoscalerTopologyEventReceiver.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/topology/AutoscalerTopologyEventReceiver.java
@@ -41,7 +41,6 @@ import org.apache.stratos.messaging.domain.topology.ClusterStatus;
import org.apache.stratos.messaging.domain.topology.GroupStatus;
import org.apache.stratos.messaging.event.Event;
import org.apache.stratos.messaging.event.topology.*;
-import org.apache.stratos.messaging.listener.application.status.GroupTerminatingEventListener;
import org.apache.stratos.messaging.listener.topology.*;
import org.apache.stratos.messaging.message.receiver.topology.TopologyEventReceiver;
import org.apache.stratos.messaging.message.receiver.topology.TopologyManager;
@@ -96,6 +95,8 @@ public class AutoscalerTopologyEventReceiver implements Runnable {
protected void onEvent(Event event) {
if (!topologyInitialized) {
+ log.info("[CompleteTopologyEvent] Received: " + event.getClass());
+
TopologyManager.acquireReadLock();
try {
for (Application application : TopologyManager.getTopology().getApplications()) {
@@ -165,7 +166,7 @@ public class AutoscalerTopologyEventReceiver implements Runnable {
@Override
protected void onEvent(Event event) {
- log.info("[ClusterActivatedEvent] Received: " + event.getClass());
+ log.info("[ClusterCreatedEvent] Received: " + event.getClass());
ClusterCreatedEvent clusterCreatedEvent = (ClusterCreatedEvent) event;
String clusterId = clusterCreatedEvent.getClusterId();
@@ -184,7 +185,7 @@ public class AutoscalerTopologyEventReceiver implements Runnable {
@Override
protected void onEvent(Event event) {
- log.info("[ClusterActivatedEvent] Received: " + event.getClass());
+ log.info("[ClusterInActivateEvent] Received: " + event.getClass());
ClusterInActivateEvent clusterInActivateEvent = (ClusterInActivateEvent) event;
String appId = clusterInActivateEvent.getAppId();
@@ -246,7 +247,7 @@ public class AutoscalerTopologyEventReceiver implements Runnable {
@Override
protected void onEvent(Event event) {
- log.info("[GroupTerminatedEven] Received: " + event.getClass());
+ log.info("[GroupTerminatingEvent] Received: " + event.getClass());
GroupTerminatingEvent groupTerminatingEvent = (GroupTerminatingEvent) event;
String appId = groupTerminatingEvent.getAppId();
@@ -267,7 +268,7 @@ public class AutoscalerTopologyEventReceiver implements Runnable {
@Override
protected void onEvent(Event event) {
- log.info("[GroupTerminatedEven] Received: " + event.getClass());
+ log.info("[GroupTerminatedEvent] Received: " + event.getClass());
GroupTerminatedEvent groupTerminatedEvent = (GroupTerminatedEvent) event;
String appId = groupTerminatedEvent.getAppId();
http://git-wip-us.apache.org/repos/asf/stratos/blob/928969d4/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/topology/ApplicationInActivateEventListener.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/topology/ApplicationInActivateEventListener.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/topology/ApplicationInActivateEventListener.java
new file mode 100644
index 0000000..d33c037
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/topology/ApplicationInActivateEventListener.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.topology;
+
+import org.apache.stratos.messaging.listener.EventListener;
+
+/**
+ * This listener will be triggered upon the application activated event received.
+ */
+public abstract class ApplicationInActivateEventListener extends EventListener {
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/928969d4/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/topology/ApplicationTerminatedEventListener.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/topology/ApplicationTerminatedEventListener.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/topology/ApplicationTerminatedEventListener.java
new file mode 100644
index 0000000..0b6fd59
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/topology/ApplicationTerminatedEventListener.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.topology;
+
+import org.apache.stratos.messaging.listener.EventListener;
+
+/**
+ * This listener will be triggered upon the application activated event received.
+ */
+public abstract class ApplicationTerminatedEventListener extends EventListener {
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/928969d4/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/topology/ApplicationTerminatingEventListener.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/topology/ApplicationTerminatingEventListener.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/topology/ApplicationTerminatingEventListener.java
new file mode 100644
index 0000000..cc26454
--- /dev/null
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/topology/ApplicationTerminatingEventListener.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.topology;
+
+import org.apache.stratos.messaging.listener.EventListener;
+
+/**
+ * This listener will be triggered upon the application activated event received.
+ */
+public abstract class ApplicationTerminatingEventListener extends EventListener {
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/928969d4/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/TopologyMessageProcessorChain.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/TopologyMessageProcessorChain.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/TopologyMessageProcessorChain.java
index 1fb3961..1e1930c 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/TopologyMessageProcessorChain.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/TopologyMessageProcessorChain.java
@@ -22,9 +22,6 @@ package org.apache.stratos.messaging.message.processor.topology;
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.ApplicationInActivatedEventListener;
-import org.apache.stratos.messaging.listener.application.status.ApplicationTerminatedEventListener;
-import org.apache.stratos.messaging.listener.application.status.ApplicationTerminatingEventListener;
import org.apache.stratos.messaging.listener.topology.*;
import org.apache.stratos.messaging.message.processor.MessageProcessorChain;
@@ -188,7 +185,7 @@ public class TopologyMessageProcessorChain extends MessageProcessorChain {
applicationRemovedMessageProcessor.addEventListener(eventListener);
} else if (eventListener instanceof ApplicationActivatedEventListener) {
applicationActivatedMessageProcessor.addEventListener(eventListener);
- } else if (eventListener instanceof ApplicationInActivatedEventListener){
+ } else if (eventListener instanceof ApplicationInActivateEventListener){
applicationInactivatedMessageProcessor.addEventListener(eventListener);
} else if(eventListener instanceof ApplicationTerminatedEventListener){
applicationTerminatedMessageProcessor.addEventListener(eventListener);