From 4262254d95887aed2616b503f4113a39f9b717f8 Mon Sep 17 00:00:00 2001 From: nash Date: Tue, 15 Sep 2009 17:18:54 +0000 Subject: Apply new naming convention to contributions/feed-logger and launchers/feed-logger git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@815406 13f79535-47bb-0310-9956-ffa450edef68 --- .../contributions/feed-logger-contribution/pom.xml | 80 ----------------- .../main/java/scatours/feedlogger/FeedLogger.java | 30 ------- .../java/scatours/feedlogger/FeedLoggerImpl.java | 98 -------------------- .../main/resources/META-INF/sca-contribution.xml | 22 ----- .../src/main/resources/feed-logger.composite | 40 --------- .../travelsample/contributions/feed-logger/pom.xml | 80 +++++++++++++++++ .../com/tuscanyscatours/feedlogger/FeedLogger.java | 30 +++++++ .../feedlogger/impl/FeedLoggerImpl.java | 100 +++++++++++++++++++++ .../main/resources/META-INF/sca-contribution.xml | 21 +++++ .../src/main/resources/feed-logger.composite | 40 +++++++++ sandbox/travelsample/contributions/pom.xml | 2 +- .../launchers/feed-logger-launcher/pom.xml | 76 ---------------- .../main/java/scatours/LaunchFeedLoggerNode.java | 46 ---------- .../main/java/scatours/feedlogger/FeedLogger.java | 30 ------- .../travelsample/launchers/feed-logger/build.xml | 48 ++++++++++ sandbox/travelsample/launchers/feed-logger/pom.xml | 76 ++++++++++++++++ .../src/main/java/scatours/FeedLoggerLauncher.java | 46 ++++++++++ .../main/java/scatours/feedlogger/FeedLogger.java | 30 +++++++ sandbox/travelsample/launchers/pom.xml | 2 +- 19 files changed, 473 insertions(+), 424 deletions(-) delete mode 100644 sandbox/travelsample/contributions/feed-logger-contribution/pom.xml delete mode 100644 sandbox/travelsample/contributions/feed-logger-contribution/src/main/java/scatours/feedlogger/FeedLogger.java delete mode 100644 sandbox/travelsample/contributions/feed-logger-contribution/src/main/java/scatours/feedlogger/FeedLoggerImpl.java delete mode 100644 sandbox/travelsample/contributions/feed-logger-contribution/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 sandbox/travelsample/contributions/feed-logger-contribution/src/main/resources/feed-logger.composite create mode 100644 sandbox/travelsample/contributions/feed-logger/pom.xml create mode 100644 sandbox/travelsample/contributions/feed-logger/src/main/java/com/tuscanyscatours/feedlogger/FeedLogger.java create mode 100644 sandbox/travelsample/contributions/feed-logger/src/main/java/com/tuscanyscatours/feedlogger/impl/FeedLoggerImpl.java create mode 100644 sandbox/travelsample/contributions/feed-logger/src/main/resources/META-INF/sca-contribution.xml create mode 100644 sandbox/travelsample/contributions/feed-logger/src/main/resources/feed-logger.composite delete mode 100644 sandbox/travelsample/launchers/feed-logger-launcher/pom.xml delete mode 100644 sandbox/travelsample/launchers/feed-logger-launcher/src/main/java/scatours/LaunchFeedLoggerNode.java delete mode 100644 sandbox/travelsample/launchers/feed-logger-launcher/src/main/java/scatours/feedlogger/FeedLogger.java create mode 100644 sandbox/travelsample/launchers/feed-logger/build.xml create mode 100644 sandbox/travelsample/launchers/feed-logger/pom.xml create mode 100644 sandbox/travelsample/launchers/feed-logger/src/main/java/scatours/FeedLoggerLauncher.java create mode 100644 sandbox/travelsample/launchers/feed-logger/src/main/java/scatours/feedlogger/FeedLogger.java (limited to 'sandbox') diff --git a/sandbox/travelsample/contributions/feed-logger-contribution/pom.xml b/sandbox/travelsample/contributions/feed-logger-contribution/pom.xml deleted file mode 100644 index 2b54ba5b7d..0000000000 --- a/sandbox/travelsample/contributions/feed-logger-contribution/pom.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.6-SNAPSHOT - - 1.0-SNAPSHOT - scatours-feed-logger-contribution - Apache Tuscany SCA Tours Feed Logger Contribution - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.6-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.6-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.6-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-atom - 1.6-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-atom-abdera - 1.6-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-rss-rome - 1.6-SNAPSHOT - - - - junit - junit - 4.5 - test - - - - - ${artifactId} - - diff --git a/sandbox/travelsample/contributions/feed-logger-contribution/src/main/java/scatours/feedlogger/FeedLogger.java b/sandbox/travelsample/contributions/feed-logger-contribution/src/main/java/scatours/feedlogger/FeedLogger.java deleted file mode 100644 index 8187e34d2c..0000000000 --- a/sandbox/travelsample/contributions/feed-logger-contribution/src/main/java/scatours/feedlogger/FeedLogger.java +++ /dev/null @@ -1,30 +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 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); -} diff --git a/sandbox/travelsample/contributions/feed-logger-contribution/src/main/java/scatours/feedlogger/FeedLoggerImpl.java b/sandbox/travelsample/contributions/feed-logger-contribution/src/main/java/scatours/feedlogger/FeedLoggerImpl.java deleted file mode 100644 index aada73fd83..0000000000 --- a/sandbox/travelsample/contributions/feed-logger-contribution/src/main/java/scatours/feedlogger/FeedLoggerImpl.java +++ /dev/null @@ -1,98 +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 scatours.feedlogger; - -import java.util.List; - -import org.apache.abdera.model.Entry; -import org.apache.abdera.model.Feed; -import org.osoa.sca.annotations.Reference; - -import com.sun.syndication.feed.synd.SyndEntry; -import com.sun.syndication.feed.synd.SyndFeed; - -public class FeedLoggerImpl implements FeedLogger { - - /** - * Reference to the SCA Tours Blog Atom feed. - */ - @Reference - public org.apache.tuscany.sca.binding.atom.collection.Collection scaToursBlogAtom; - - /** - * Reference to the SCA Tours Blog RSS feed. - */ - @Reference - public org.apache.tuscany.sca.binding.rss.collection.Collection scaToursBlogRSS; - - /** - * Reference to the BBC News RSS feed. - */ - @Reference - public org.apache.tuscany.sca.binding.rss.collection.Collection bbcNews; - - /** - * {@inheritDoc} - */ - public void logFeeds(int maxEntriesPerFeed) { - System.out.println("Logging SCA Tours Blog Atom feed:"); - logAtomFeed(scaToursBlogAtom, maxEntriesPerFeed); - - System.out.println("Logging SCA Tours Blog RSS feed:"); - logRSSFeed(scaToursBlogRSS, maxEntriesPerFeed); - - System.out.println("Logging BBC News feed:"); - logRSSFeed(bbcNews, maxEntriesPerFeed); - } - - /** - * Logs up to maxEntries entries from the specified feed. - * - * @param maxEntries The maximum number of entries to log per feed - */ - private void logAtomFeed(org.apache.tuscany.sca.binding.atom.collection.Collection atomFeed, int maxEntries) { - final Feed feed = atomFeed.getFeed(); - System.out.println("Feed: " + feed.getTitle()); - final List entries = feed.getEntries(); - - for (int i = 0; i < entries.size() && i < maxEntries; i++) { - Entry entry = entries.get(i); - System.out.println("Entry: " + entry.getTitle()); - } - System.out.println(); - } - - /** - * Logs up to maxEntries entries from the specified feed. - * - * @param maxEntries The maximum number of entries to log - */ - private void logRSSFeed(org.apache.tuscany.sca.binding.rss.collection.Collection rssFeed, int maxEntries) { - SyndFeed feed = rssFeed.getFeed(); - System.out.println("Feed: " + feed.getTitle()); - - List entries = feed.getEntries(); - for (int i = 0; i < entries.size() && i < maxEntries; i++) { - SyndEntry entry = entries.get(i); - System.out.println("Entry: " + entry.getTitle()); - } - System.out.println(); - } -} diff --git a/sandbox/travelsample/contributions/feed-logger-contribution/src/main/resources/META-INF/sca-contribution.xml b/sandbox/travelsample/contributions/feed-logger-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 181a1ec77c..0000000000 --- a/sandbox/travelsample/contributions/feed-logger-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - \ No newline at end of file diff --git a/sandbox/travelsample/contributions/feed-logger-contribution/src/main/resources/feed-logger.composite b/sandbox/travelsample/contributions/feed-logger-contribution/src/main/resources/feed-logger.composite deleted file mode 100644 index 62f5f2258c..0000000000 --- a/sandbox/travelsample/contributions/feed-logger-contribution/src/main/resources/feed-logger.composite +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/travelsample/contributions/feed-logger/pom.xml b/sandbox/travelsample/contributions/feed-logger/pom.xml new file mode 100644 index 0000000000..2c70e79528 --- /dev/null +++ b/sandbox/travelsample/contributions/feed-logger/pom.xml @@ -0,0 +1,80 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 1.6-SNAPSHOT + + 1.0-SNAPSHOT + scatours-contribution-feed-logger + Apache Tuscany SCA Tours Feed Logger Contribution + + + + org.apache.tuscany.sca + tuscany-host-embedded + 1.6-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-host-tomcat + 1.6-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 1.6-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-binding-atom + 1.6-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-binding-atom-abdera + 1.6-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-binding-rss-rome + 1.6-SNAPSHOT + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + diff --git a/sandbox/travelsample/contributions/feed-logger/src/main/java/com/tuscanyscatours/feedlogger/FeedLogger.java b/sandbox/travelsample/contributions/feed-logger/src/main/java/com/tuscanyscatours/feedlogger/FeedLogger.java new file mode 100644 index 0000000000..0f5d18d53b --- /dev/null +++ b/sandbox/travelsample/contributions/feed-logger/src/main/java/com/tuscanyscatours/feedlogger/FeedLogger.java @@ -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 com.tuscanyscatours.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); +} diff --git a/sandbox/travelsample/contributions/feed-logger/src/main/java/com/tuscanyscatours/feedlogger/impl/FeedLoggerImpl.java b/sandbox/travelsample/contributions/feed-logger/src/main/java/com/tuscanyscatours/feedlogger/impl/FeedLoggerImpl.java new file mode 100644 index 0000000000..7f1e25a828 --- /dev/null +++ b/sandbox/travelsample/contributions/feed-logger/src/main/java/com/tuscanyscatours/feedlogger/impl/FeedLoggerImpl.java @@ -0,0 +1,100 @@ +/* + * 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 com.tuscanyscatours.feedlogger.impl; + +import java.util.List; + +import com.tuscanyscatours.feedlogger.FeedLogger; + +import org.apache.abdera.model.Entry; +import org.apache.abdera.model.Feed; +import org.osoa.sca.annotations.Reference; + +import com.sun.syndication.feed.synd.SyndEntry; +import com.sun.syndication.feed.synd.SyndFeed; + +public class FeedLoggerImpl implements FeedLogger { + + /** + * Reference to the SCA Tours Blog Atom feed. + */ + @Reference + public org.apache.tuscany.sca.binding.atom.collection.Collection scaToursBlogAtom; + + /** + * Reference to the SCA Tours Blog RSS feed. + */ + @Reference + public org.apache.tuscany.sca.binding.rss.collection.Collection scaToursBlogRSS; + + /** + * Reference to the BBC News RSS feed. + */ + @Reference + public org.apache.tuscany.sca.binding.rss.collection.Collection bbcNews; + + /** + * {@inheritDoc} + */ + public void logFeeds(int maxEntriesPerFeed) { + System.out.println("Logging SCA Tours Blog Atom feed:"); + logAtomFeed(scaToursBlogAtom, maxEntriesPerFeed); + + System.out.println("Logging SCA Tours Blog RSS feed:"); + logRSSFeed(scaToursBlogRSS, maxEntriesPerFeed); + + System.out.println("Logging BBC News feed:"); + logRSSFeed(bbcNews, maxEntriesPerFeed); + } + + /** + * Logs up to maxEntries entries from the specified feed. + * + * @param maxEntries The maximum number of entries to log per feed + */ + private void logAtomFeed(org.apache.tuscany.sca.binding.atom.collection.Collection atomFeed, int maxEntries) { + final Feed feed = atomFeed.getFeed(); + System.out.println("Feed: " + feed.getTitle()); + final List entries = feed.getEntries(); + + for (int i = 0; i < entries.size() && i < maxEntries; i++) { + Entry entry = entries.get(i); + System.out.println("Entry: " + entry.getTitle()); + } + System.out.println(); + } + + /** + * Logs up to maxEntries entries from the specified feed. + * + * @param maxEntries The maximum number of entries to log + */ + private void logRSSFeed(org.apache.tuscany.sca.binding.rss.collection.Collection rssFeed, int maxEntries) { + SyndFeed feed = rssFeed.getFeed(); + System.out.println("Feed: " + feed.getTitle()); + + List entries = feed.getEntries(); + for (int i = 0; i < entries.size() && i < maxEntries; i++) { + SyndEntry entry = entries.get(i); + System.out.println("Entry: " + entry.getTitle()); + } + System.out.println(); + } +} diff --git a/sandbox/travelsample/contributions/feed-logger/src/main/resources/META-INF/sca-contribution.xml b/sandbox/travelsample/contributions/feed-logger/src/main/resources/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..556807a0f0 --- /dev/null +++ b/sandbox/travelsample/contributions/feed-logger/src/main/resources/META-INF/sca-contribution.xml @@ -0,0 +1,21 @@ + + + + diff --git a/sandbox/travelsample/contributions/feed-logger/src/main/resources/feed-logger.composite b/sandbox/travelsample/contributions/feed-logger/src/main/resources/feed-logger.composite new file mode 100644 index 0000000000..17c24adefb --- /dev/null +++ b/sandbox/travelsample/contributions/feed-logger/src/main/resources/feed-logger.composite @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/sandbox/travelsample/contributions/pom.xml b/sandbox/travelsample/contributions/pom.xml index e81c225276..63042e9deb 100644 --- a/sandbox/travelsample/contributions/pom.xml +++ b/sandbox/travelsample/contributions/pom.xml @@ -52,7 +52,7 @@ currency-ws databinding-client emailgateway - feed-logger-contribution + feed-logger flight fullapp-ui fullapp-frontend diff --git a/sandbox/travelsample/launchers/feed-logger-launcher/pom.xml b/sandbox/travelsample/launchers/feed-logger-launcher/pom.xml deleted file mode 100644 index e6d7e43297..0000000000 --- a/sandbox/travelsample/launchers/feed-logger-launcher/pom.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.5 - - 1.0-SNAPSHOT - scatours-feed-logger-launcher - Apache Tuscany SCA Tours Feed Logger Launcher - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.6-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.6-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.6-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-atom-abdera - 1.6-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-rss-rome - 1.6-SNAPSHOT - runtime - - - - junit - junit - 4.5 - test - - - - - ${artifactId} - - diff --git a/sandbox/travelsample/launchers/feed-logger-launcher/src/main/java/scatours/LaunchFeedLoggerNode.java b/sandbox/travelsample/launchers/feed-logger-launcher/src/main/java/scatours/LaunchFeedLoggerNode.java deleted file mode 100644 index 02ab6155dd..0000000000 --- a/sandbox/travelsample/launchers/feed-logger-launcher/src/main/java/scatours/LaunchFeedLoggerNode.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package 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(); - } -} diff --git a/sandbox/travelsample/launchers/feed-logger-launcher/src/main/java/scatours/feedlogger/FeedLogger.java b/sandbox/travelsample/launchers/feed-logger-launcher/src/main/java/scatours/feedlogger/FeedLogger.java deleted file mode 100644 index 8187e34d2c..0000000000 --- a/sandbox/travelsample/launchers/feed-logger-launcher/src/main/java/scatours/feedlogger/FeedLogger.java +++ /dev/null @@ -1,30 +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 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); -} diff --git a/sandbox/travelsample/launchers/feed-logger/build.xml b/sandbox/travelsample/launchers/feed-logger/build.xml new file mode 100644 index 0000000000..e772c2f67a --- /dev/null +++ b/sandbox/travelsample/launchers/feed-logger/build.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sandbox/travelsample/launchers/feed-logger/pom.xml b/sandbox/travelsample/launchers/feed-logger/pom.xml new file mode 100644 index 0000000000..339ad7b975 --- /dev/null +++ b/sandbox/travelsample/launchers/feed-logger/pom.xml @@ -0,0 +1,76 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 1.5 + + 1.0-SNAPSHOT + scatours-launcher-feed-logger + Apache Tuscany SCA Tours Feed Logger Launcher + + + + org.apache.tuscany.sca + tuscany-host-embedded + 1.6-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-host-tomcat + 1.6-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 1.6-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-binding-atom-abdera + 1.6-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-binding-rss-rome + 1.6-SNAPSHOT + runtime + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + diff --git a/sandbox/travelsample/launchers/feed-logger/src/main/java/scatours/FeedLoggerLauncher.java b/sandbox/travelsample/launchers/feed-logger/src/main/java/scatours/FeedLoggerLauncher.java new file mode 100644 index 0000000000..a92c149d77 --- /dev/null +++ b/sandbox/travelsample/launchers/feed-logger/src/main/java/scatours/FeedLoggerLauncher.java @@ -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 FeedLoggerLauncher { + + public static void main(String[] args) throws Exception { + SCAContribution feedContribution = + new SCAContribution("feed-logger", + "../../contributions/feed-logger/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(); + } +} diff --git a/sandbox/travelsample/launchers/feed-logger/src/main/java/scatours/feedlogger/FeedLogger.java b/sandbox/travelsample/launchers/feed-logger/src/main/java/scatours/feedlogger/FeedLogger.java new file mode 100644 index 0000000000..8187e34d2c --- /dev/null +++ b/sandbox/travelsample/launchers/feed-logger/src/main/java/scatours/feedlogger/FeedLogger.java @@ -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); +} diff --git a/sandbox/travelsample/launchers/pom.xml b/sandbox/travelsample/launchers/pom.xml index fcbd21048c..a9b4ca8b61 100644 --- a/sandbox/travelsample/launchers/pom.xml +++ b/sandbox/travelsample/launchers/pom.xml @@ -44,7 +44,7 @@ currency-converter-rmi currency-converter-ws databinding - feed-logger-launcher + feed-logger interaction introducing introducing-client -- cgit v1.2.3