summaryrefslogtreecommitdiffstats
path: root/java/sca/samples/calculator/src
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-05-14 19:38:45 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-05-14 19:38:45 +0000
commitdec6aa60eb742389f8a99fa143e018683d796e73 (patch)
tree564c37709fcc4608c2c37e79b0e309769dabd2cb /java/sca/samples/calculator/src
parent17e285b4df250d2f0d8daaba4be0df2aba23bc43 (diff)
Add @Service annotations
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@774895 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/samples/calculator/src')
-rw-r--r--java/sca/samples/calculator/src/main/java/calculator/AddServiceImpl.java9
-rw-r--r--java/sca/samples/calculator/src/main/java/calculator/CalculatorServiceImpl.java8
-rw-r--r--java/sca/samples/calculator/src/main/java/calculator/DivideServiceImpl.java9
-rw-r--r--java/sca/samples/calculator/src/main/java/calculator/MultiplyServiceImpl.java9
-rw-r--r--java/sca/samples/calculator/src/main/java/calculator/SubtractServiceImpl.java9
5 files changed, 29 insertions, 15 deletions
diff --git a/java/sca/samples/calculator/src/main/java/calculator/AddServiceImpl.java b/java/sca/samples/calculator/src/main/java/calculator/AddServiceImpl.java
index 7ca8fb04b5..bb75bb2337 100644
--- a/java/sca/samples/calculator/src/main/java/calculator/AddServiceImpl.java
+++ b/java/sca/samples/calculator/src/main/java/calculator/AddServiceImpl.java
@@ -6,24 +6,27 @@
* 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.
+ * under the License.
*/
package calculator;
import java.util.logging.Level;
import java.util.logging.Logger;
+import org.oasisopen.sca.annotation.Service;
+
/**
* An implementation of the Add service
*/
+@Service(AddService.class)
public class AddServiceImpl implements AddService {
public double add(double n1, double n2) {
diff --git a/java/sca/samples/calculator/src/main/java/calculator/CalculatorServiceImpl.java b/java/sca/samples/calculator/src/main/java/calculator/CalculatorServiceImpl.java
index 17fad7de6b..fc53393d23 100644
--- a/java/sca/samples/calculator/src/main/java/calculator/CalculatorServiceImpl.java
+++ b/java/sca/samples/calculator/src/main/java/calculator/CalculatorServiceImpl.java
@@ -6,24 +6,26 @@
* 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.
+ * under the License.
*/
package calculator;
import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
/**
* An implementation of the Calculator service.
*/
+@Service(CalculatorService.class)
public class CalculatorServiceImpl implements CalculatorService {
private AddService addService;
diff --git a/java/sca/samples/calculator/src/main/java/calculator/DivideServiceImpl.java b/java/sca/samples/calculator/src/main/java/calculator/DivideServiceImpl.java
index 1323edf55a..b1250ed9f2 100644
--- a/java/sca/samples/calculator/src/main/java/calculator/DivideServiceImpl.java
+++ b/java/sca/samples/calculator/src/main/java/calculator/DivideServiceImpl.java
@@ -6,24 +6,27 @@
* 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.
+ * under the License.
*/
package calculator;
import java.util.logging.Level;
import java.util.logging.Logger;
+import org.oasisopen.sca.annotation.Service;
+
/**
* An implementation of the Divide service.
*/
+@Service(DivideService.class)
public class DivideServiceImpl implements DivideService {
public double divide(double n1, double n2) {
diff --git a/java/sca/samples/calculator/src/main/java/calculator/MultiplyServiceImpl.java b/java/sca/samples/calculator/src/main/java/calculator/MultiplyServiceImpl.java
index 91b803bc9e..11f68c66e3 100644
--- a/java/sca/samples/calculator/src/main/java/calculator/MultiplyServiceImpl.java
+++ b/java/sca/samples/calculator/src/main/java/calculator/MultiplyServiceImpl.java
@@ -6,24 +6,27 @@
* 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.
+ * under the License.
*/
package calculator;
import java.util.logging.Level;
import java.util.logging.Logger;
+import org.oasisopen.sca.annotation.Service;
+
/**
* An implementation of the Multiply service.
*/
+@Service(MultiplyService.class)
public class MultiplyServiceImpl implements MultiplyService {
public double multiply(double n1, double n2) {
diff --git a/java/sca/samples/calculator/src/main/java/calculator/SubtractServiceImpl.java b/java/sca/samples/calculator/src/main/java/calculator/SubtractServiceImpl.java
index 58cc4a3547..30e59bf668 100644
--- a/java/sca/samples/calculator/src/main/java/calculator/SubtractServiceImpl.java
+++ b/java/sca/samples/calculator/src/main/java/calculator/SubtractServiceImpl.java
@@ -6,24 +6,27 @@
* 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.
+ * under the License.
*/
package calculator;
import java.util.logging.Level;
import java.util.logging.Logger;
+import org.oasisopen.sca.annotation.Service;
+
/**
* An implementation of the subtract service.
*/
+@Service(SubtractService.class)
public class SubtractServiceImpl implements SubtractService {
public double subtract(double n1, double n2) {