From 28785b57e4c114114916d64422d6e1747d7fa373 Mon Sep 17 00:00:00 2001 From: fmoga Date: Tue, 31 May 2011 10:52:31 +0000 Subject: Clean up sandbox space. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1129617 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tuscany/sca/sample/comet/Helper.java | 34 ----- .../tuscany/sca/sample/comet/HumidityService.java | 31 ---- .../sca/sample/comet/PrecipitationService.java | 34 ----- .../sca/sample/comet/PrecipitationServiceImpl.java | 61 -------- .../comet/TemperatureHumidityServiceImpl.java | 48 ------- .../sca/sample/comet/TemperatureService.java | 34 ----- .../tuscany/sca/sample/comet/model/Location.java | 43 ------ .../tuscany/sca/sample/comet/model/Response.java | 45 ------ .../src/main/webapp/META-INF/MANIFEST.MF | 2 - .../src/main/webapp/WEB-INF/appengine-web.xml | 24 ---- .../src/main/webapp/WEB-INF/web.composite | 45 ------ .../src/main/webapp/WEB-INF/web.xml | 34 ----- .../src/main/webapp/index.html | 157 --------------------- 13 files changed, 592 deletions(-) delete mode 100644 sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/Helper.java delete mode 100644 sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/HumidityService.java delete mode 100644 sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/PrecipitationService.java delete mode 100644 sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/PrecipitationServiceImpl.java delete mode 100644 sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/TemperatureHumidityServiceImpl.java delete mode 100644 sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/TemperatureService.java delete mode 100644 sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/model/Location.java delete mode 100644 sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/model/Response.java delete mode 100644 sandbox/fmoga/binding-comet-sample/src/main/webapp/META-INF/MANIFEST.MF delete mode 100644 sandbox/fmoga/binding-comet-sample/src/main/webapp/WEB-INF/appengine-web.xml delete mode 100644 sandbox/fmoga/binding-comet-sample/src/main/webapp/WEB-INF/web.composite delete mode 100644 sandbox/fmoga/binding-comet-sample/src/main/webapp/WEB-INF/web.xml delete mode 100644 sandbox/fmoga/binding-comet-sample/src/main/webapp/index.html (limited to 'sandbox/fmoga/binding-comet-sample/src/main') diff --git a/sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/Helper.java b/sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/Helper.java deleted file mode 100644 index eecc6044ea..0000000000 --- a/sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/Helper.java +++ /dev/null @@ -1,34 +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.tuscany.sca.sample.comet; - -import java.util.Date; -import java.util.Random; - -public final class Helper { - - public static int randomInt(final int max) { - return (new Random(new Date().getTime()).nextInt(100)); - } - - private Helper() { - } - -} diff --git a/sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/HumidityService.java b/sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/HumidityService.java deleted file mode 100644 index 00cbe73e82..0000000000 --- a/sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/HumidityService.java +++ /dev/null @@ -1,31 +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.tuscany.sca.sample.comet; - -import org.apache.tuscany.sca.sample.comet.model.Location; -import org.apache.tuscany.sca.sample.comet.model.Response; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface HumidityService { - - Response getHumidity(Location location); - -} diff --git a/sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/PrecipitationService.java b/sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/PrecipitationService.java deleted file mode 100644 index bbfc284377..0000000000 --- a/sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/PrecipitationService.java +++ /dev/null @@ -1,34 +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.tuscany.sca.sample.comet; - -import org.apache.tuscany.sca.binding.comet.runtime.callback.CometCallback; -import org.apache.tuscany.sca.sample.comet.model.Location; -import org.apache.tuscany.sca.sample.comet.model.Response; -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -@Callback(CometCallback.class) -public interface PrecipitationService { - - Response getPrecipitation(Location location); - -} diff --git a/sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/PrecipitationServiceImpl.java b/sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/PrecipitationServiceImpl.java deleted file mode 100644 index a22cadb620..0000000000 --- a/sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/PrecipitationServiceImpl.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.tuscany.sca.sample.comet; - -import java.util.Date; - -import org.apache.tuscany.sca.binding.comet.runtime.callback.CometCallback; -import org.apache.tuscany.sca.sample.comet.model.Location; -import org.apache.tuscany.sca.sample.comet.model.Response; -import org.oasisopen.sca.ComponentContext; -import org.oasisopen.sca.ServiceReference; -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Context; -import org.oasisopen.sca.annotation.Service; - -@Service(PrecipitationService.class) -public class PrecipitationServiceImpl implements PrecipitationService { - - @Context - protected ComponentContext componentContext; - -// @Callback -// protected CometCallback callback; - - @Callback - protected ServiceReference callbackRef; - - @Override - public Response getPrecipitation(final Location location) { - System.out.println("Using @Context: " + componentContext.getRequestContext().getCallback()); - -// System.out.println("Using @Callback: " + callback); - - System.out.println("Using @Callback with ServiceReference: " + callbackRef); - - // ---------------- - - final Response response = new Response(); - response.setDate(new Date()); - response.setData(Helper.randomInt(100) + "%"); - return response; - } - -} diff --git a/sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/TemperatureHumidityServiceImpl.java b/sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/TemperatureHumidityServiceImpl.java deleted file mode 100644 index 55f935fa9f..0000000000 --- a/sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/TemperatureHumidityServiceImpl.java +++ /dev/null @@ -1,48 +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.tuscany.sca.sample.comet; - -import java.util.Date; - -import org.apache.tuscany.sca.sample.comet.model.Location; -import org.apache.tuscany.sca.sample.comet.model.Response; -import org.oasisopen.sca.annotation.Service; - -@Service({TemperatureService.class, HumidityService.class}) -public class TemperatureHumidityServiceImpl implements TemperatureService, HumidityService { - - @Override - public Response getHumidity(final Location location) { - final Response response = new Response(); - response.setDate(new Date()); - response.setData(Helper.randomInt(90) + "%"); - return response; - } - - @Override - public Response getTemperature(final Location location, final int scale) { - final Response response = new Response(); - response.setDate(new Date()); - final String data = "" + Helper.randomInt(scale == TemperatureService.CELSIUS ? 40 : 150); - response.setData(data); - return response; - } - -} diff --git a/sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/TemperatureService.java b/sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/TemperatureService.java deleted file mode 100644 index 092988213b..0000000000 --- a/sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/TemperatureService.java +++ /dev/null @@ -1,34 +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.tuscany.sca.sample.comet; - -import org.apache.tuscany.sca.sample.comet.model.Location; -import org.apache.tuscany.sca.sample.comet.model.Response; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface TemperatureService { - - public static final int CELSIUS = 1; - public static final int FAHRENHEIT = 2; - - Response getTemperature(Location location, int scale); - -} diff --git a/sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/model/Location.java b/sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/model/Location.java deleted file mode 100644 index ff2da3a360..0000000000 --- a/sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/model/Location.java +++ /dev/null @@ -1,43 +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.tuscany.sca.sample.comet.model; - -public class Location { - - private String city; - private String country; - - public String getCity() { - return this.city; - } - - public void setCity(final String city) { - this.city = city; - } - - public String getCountry() { - return this.country; - } - - public void setCountry(final String country) { - this.country = country; - } - -} diff --git a/sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/model/Response.java b/sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/model/Response.java deleted file mode 100644 index aaa23f0b8a..0000000000 --- a/sandbox/fmoga/binding-comet-sample/src/main/java/org/apache/tuscany/sca/sample/comet/model/Response.java +++ /dev/null @@ -1,45 +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.tuscany.sca.sample.comet.model; - -import java.util.Date; - -public class Response { - - private Date date; - private String data; - - public Date getDate() { - return this.date; - } - - public void setDate(final Date date) { - this.date = date; - } - - public String getData() { - return this.data; - } - - public void setData(final String data) { - this.data = data; - } - -} diff --git a/sandbox/fmoga/binding-comet-sample/src/main/webapp/META-INF/MANIFEST.MF b/sandbox/fmoga/binding-comet-sample/src/main/webapp/META-INF/MANIFEST.MF deleted file mode 100644 index 58630c02ef..0000000000 --- a/sandbox/fmoga/binding-comet-sample/src/main/webapp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/sandbox/fmoga/binding-comet-sample/src/main/webapp/WEB-INF/appengine-web.xml b/sandbox/fmoga/binding-comet-sample/src/main/webapp/WEB-INF/appengine-web.xml deleted file mode 100644 index 8696f76c50..0000000000 --- a/sandbox/fmoga/binding-comet-sample/src/main/webapp/WEB-INF/appengine-web.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - tuscany-comet - 1 - true - \ No newline at end of file diff --git a/sandbox/fmoga/binding-comet-sample/src/main/webapp/WEB-INF/web.composite b/sandbox/fmoga/binding-comet-sample/src/main/webapp/WEB-INF/web.composite deleted file mode 100644 index 05b2ddd0d7..0000000000 --- a/sandbox/fmoga/binding-comet-sample/src/main/webapp/WEB-INF/web.composite +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sandbox/fmoga/binding-comet-sample/src/main/webapp/WEB-INF/web.xml b/sandbox/fmoga/binding-comet-sample/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 25b06c457a..0000000000 --- a/sandbox/fmoga/binding-comet-sample/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - Apache Tuscany Stock Comet Sample - - tuscany - org.apache.tuscany.sca.host.webapp.TuscanyServletFilter - true - - - tuscany - /* - - - index.html - - \ No newline at end of file diff --git a/sandbox/fmoga/binding-comet-sample/src/main/webapp/index.html b/sandbox/fmoga/binding-comet-sample/src/main/webapp/index.html deleted file mode 100644 index 0387e67adb..0000000000 --- a/sandbox/fmoga/binding-comet-sample/src/main/webapp/index.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - Apache Tuscany Comet Sample - - - - - - - - - -- cgit v1.2.3