You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by mc...@apache.org on 2009/06/21 20:20:40 UTC

svn commit: r787063 - in /tuscany/sandbox/travelsample/launchers/feed-logger-launcher: ./ src/ src/main/ src/main/java/ src/main/java/scatours/ src/main/java/scatours/feedlogger/ src/test/

Author: mcombellack
Date: Sun Jun 21 18:20:40 2009
New Revision: 787063

URL: http://svn.apache.org/viewvc?rev=787063&view=rev
Log:
Launcher that can be used to run the feed logger contribution

Added:
    tuscany/sandbox/travelsample/launchers/feed-logger-launcher/   (with props)
    tuscany/sandbox/travelsample/launchers/feed-logger-launcher/pom.xml
    tuscany/sandbox/travelsample/launchers/feed-logger-launcher/src/
    tuscany/sandbox/travelsample/launchers/feed-logger-launcher/src/main/
    tuscany/sandbox/travelsample/launchers/feed-logger-launcher/src/main/java/
    tuscany/sandbox/travelsample/launchers/feed-logger-launcher/src/main/java/scatours/
    tuscany/sandbox/travelsample/launchers/feed-logger-launcher/src/main/java/scatours/LaunchFeedLoggerNode.java
    tuscany/sandbox/travelsample/launchers/feed-logger-launcher/src/main/java/scatours/feedlogger/
    tuscany/sandbox/travelsample/launchers/feed-logger-launcher/src/main/java/scatours/feedlogger/FeedLogger.java
    tuscany/sandbox/travelsample/launchers/feed-logger-launcher/src/test/

Propchange: tuscany/sandbox/travelsample/launchers/feed-logger-launcher/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Jun 21 18:20:40 2009
@@ -0,0 +1,8 @@
+.classpath
+.project
+.settings
+target
+maven-eclipse.xml
+.externalToolBuilders
+.settings
+work

Added: tuscany/sandbox/travelsample/launchers/feed-logger-launcher/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/launchers/feed-logger-launcher/pom.xml?rev=787063&view=auto
==============================================================================
--- tuscany/sandbox/travelsample/launchers/feed-logger-launcher/pom.xml (added)
+++ tuscany/sandbox/travelsample/launchers/feed-logger-launcher/pom.xml Sun Jun 21 18:20:40 2009
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    * Licensed to the Apache Software Foundation (ASF) under one
+    * or more contributor license agreements.  See the NOTICE file
+    * distributed with this work for additional information
+    * regarding copyright ownership.  The ASF licenses this file
+    * to you under the Apache License, Version 2.0 (the
+    * "License"); you may not use this file except in compliance
+    * with the License.  You may obtain a copy of the License at
+    * 
+    *   http://www.apache.org/licenses/LICENSE-2.0
+    * 
+    * Unless required by applicable law or agreed to in writing,
+    * software distributed under the License is distributed on an
+    * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    * KIND, either express or implied.  See the License for the
+    * specific language governing permissions and limitations
+    * under the License.    
+-->
+<project>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.tuscany.sca</groupId>
+        <artifactId>tuscany-sca</artifactId>
+        <version>1.5</version>
+        <!--relativePath>../../pom.xml</relativePath-->
+    </parent><version>1.0-SNAPSHOT</version>
+    <artifactId>scatours-feed-logger-launcher</artifactId>
+    <name>Apache Tuscany SCA Tours Feed Logger Launcher</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-embedded</artifactId>
+            <version>1.6-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-tomcat</artifactId>
+            <version>1.6-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-java-runtime</artifactId>
+            <version>1.6-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-atom-abdera</artifactId>
+            <version>1.6-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-rss-rome</artifactId>
+            <version>1.6-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.5</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+    
+    <build>
+       <finalName>${artifactId}</finalName>
+    </build>
+</project>

Added: tuscany/sandbox/travelsample/launchers/feed-logger-launcher/src/main/java/scatours/LaunchFeedLoggerNode.java
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/launchers/feed-logger-launcher/src/main/java/scatours/LaunchFeedLoggerNode.java?rev=787063&view=auto
==============================================================================
--- tuscany/sandbox/travelsample/launchers/feed-logger-launcher/src/main/java/scatours/LaunchFeedLoggerNode.java (added)
+++ tuscany/sandbox/travelsample/launchers/feed-logger-launcher/src/main/java/scatours/LaunchFeedLoggerNode.java Sun Jun 21 18:20:40 2009
@@ -0,0 +1,46 @@
+/*
+ * 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 scatours;
+
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCAContribution;
+import org.apache.tuscany.sca.node.SCANode;
+import org.apache.tuscany.sca.node.SCANodeFactory;
+
+import scatours.feedlogger.FeedLogger;
+
+public class LaunchFeedLoggerNode {
+
+    public static void main(String[] args) throws Exception {
+        SCAContribution feedContribution = 
+          new SCAContribution("feed-logger", 
+              "../../contributions/feed-logger-contribution/target/classes");
+
+        SCANode node = SCANodeFactory.newInstance().createSCANode(
+            "feed-logger.composite", feedContribution);
+        node.start();
+        
+        FeedLogger logger = ((SCAClient)node).getService(
+                        FeedLogger.class, "FeedLogger");
+        logger.logFeeds(5);
+
+        node.stop();
+    }
+}

Added: tuscany/sandbox/travelsample/launchers/feed-logger-launcher/src/main/java/scatours/feedlogger/FeedLogger.java
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/launchers/feed-logger-launcher/src/main/java/scatours/feedlogger/FeedLogger.java?rev=787063&view=auto
==============================================================================
--- tuscany/sandbox/travelsample/launchers/feed-logger-launcher/src/main/java/scatours/feedlogger/FeedLogger.java (added)
+++ tuscany/sandbox/travelsample/launchers/feed-logger-launcher/src/main/java/scatours/feedlogger/FeedLogger.java Sun Jun 21 18:20:40 2009
@@ -0,0 +1,30 @@
+/*
+ * 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 scatours.feedlogger;
+
+public interface FeedLogger {
+
+    /**
+     * Captures the configured feeds and logs the feed entries.
+     * 
+     * @param maxEntriesPerFeed The maximum number of entries to log per feed 
+     */
+    public void logFeeds(int maxEntriesPerFeed);
+}