You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by is...@apache.org on 2014/02/17 15:11:24 UTC

[1/2] git commit: adding a interface to support other data publisher scenarios

Repository: incubator-stratos
Updated Branches:
  refs/heads/master 0bb15d182 -> 2e8e3033a


adding a interface to support other data publisher scenarios


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

Branch: refs/heads/master
Commit: e308ae5d4a5b4ca7627e10a5959f90590745d293
Parents: c271ce8
Author: Isuru <is...@wso2.com>
Authored: Mon Feb 17 19:41:02 2014 +0530
Committer: Isuru <is...@wso2.com>
Committed: Mon Feb 17 19:41:02 2014 +0530

----------------------------------------------------------------------
 .../agent/data/publisher/DataPublisher.java     |  6 ++--
 .../data/publisher/GenericDataPublisher.java    | 29 ++++++++++++++++++++
 2 files changed, 32 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/e308ae5d/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/data/publisher/DataPublisher.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/data/publisher/DataPublisher.java b/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/data/publisher/DataPublisher.java
index 4601a74..727beb6 100644
--- a/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/data/publisher/DataPublisher.java
+++ b/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/data/publisher/DataPublisher.java
@@ -30,7 +30,7 @@ import org.wso2.carbon.databridge.commons.StreamDefinition;
 
 import java.util.Date;
 
-public abstract class DataPublisher {
+public abstract class DataPublisher implements GenericDataPublisher {
 
     private static final Log log = LogFactory.getLog(DataPublisher.class);
 
@@ -65,7 +65,7 @@ public abstract class DataPublisher {
         log.info("DataPublisher initialized");
     }
 
-    protected void publish (DataContext dataContext) {
+    public void publish (DataContext dataContext) {
 
         Event event = new Event();
         event.setTimeStamp(new Date().getTime());
@@ -82,7 +82,7 @@ public abstract class DataPublisher {
         }
     }
 
-    protected void terminate () {
+    public void terminate () {
 
         dataPublisher.stop();
     }

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/e308ae5d/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/data/publisher/GenericDataPublisher.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/data/publisher/GenericDataPublisher.java b/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/data/publisher/GenericDataPublisher.java
new file mode 100644
index 0000000..4f8dd44
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/data/publisher/GenericDataPublisher.java
@@ -0,0 +1,29 @@
+package org.apache.stratos.cartridge.agent.data.publisher;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+public interface GenericDataPublisher {
+
+    public void initialize ();
+
+    public void publish (DataContext dataContext);
+
+    public void terminate ();
+}


[2/2] git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-stratos

Posted by is...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-stratos


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

Branch: refs/heads/master
Commit: 2e8e3033a4b5756a197441fb10ac98918f81776e
Parents: e308ae5 0bb15d1
Author: Isuru <is...@wso2.com>
Authored: Mon Feb 17 19:41:10 2014 +0530
Committer: Isuru <is...@wso2.com>
Committed: Mon Feb 17 19:41:10 2014 +0530

----------------------------------------------------------------------
 .../stratos/cartridge/agent/CartridgeAgent.java |  6 +--
 .../publisher/CartridgeAgentEventPublisher.java | 28 +++++++++++++
 .../stratos/cli/RestCommandLineService.java     |  4 +-
 .../cli/beans/cartridge/CartridgeInfoBean.java  |  9 ++++
 .../stratos/cli/commands/SubscribeCommand.java  | 22 +++++++++-
 .../apache/stratos/cli/utils/CliConstants.java  |  3 ++
 .../impl/CloudControllerServiceImpl.java        |  8 +++-
 .../InstanceStatusEventMessageDelegator.java    |  6 +++
 .../controller/topology/TopologyBuilder.java    | 44 +++++++++++++++++++-
 .../topology/TopologyEventPublisher.java        | 11 ++++-
 .../controllers/cartridgeSubscribeSubmit.jag    |  4 +-
 .../theme1/partials/subscribe_cartridge.hbs     | 14 ++-----
 .../messaging/domain/topology/MemberStatus.java |  3 +-
 .../topology/MemberReadyToShutdownEvent.java    | 18 ++++++++
 14 files changed, 157 insertions(+), 23 deletions(-)
----------------------------------------------------------------------