diff options
author | kelvingoodson <kelvingoodson@13f79535-47bb-0310-9956-ffa450edef68> | 2010-09-14 13:15:40 +0000 |
---|---|---|
committer | kelvingoodson <kelvingoodson@13f79535-47bb-0310-9956-ffa450edef68> | 2010-09-14 13:15:40 +0000 |
commit | 19852f7c240afa2dfaf43469235d7bd7bf25efe2 (patch) | |
tree | 4e8598a232488226757706eebbd1d053f7541645 /sca-java-2.x/trunk/samples/sca-features/binding-sca/contribution-calculator/src/main/java/calculator/MultiplyServiceImpl.java | |
parent | 76ba274800421aac90b65c4aaed740f1aba7128a (diff) |
TUSCANY-3677 server side move of some sca feature samples (matching pom change to follow shortly)
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@996885 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/samples/sca-features/binding-sca/contribution-calculator/src/main/java/calculator/MultiplyServiceImpl.java')
-rw-r--r-- | sca-java-2.x/trunk/samples/sca-features/binding-sca/contribution-calculator/src/main/java/calculator/MultiplyServiceImpl.java | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/samples/sca-features/binding-sca/contribution-calculator/src/main/java/calculator/MultiplyServiceImpl.java b/sca-java-2.x/trunk/samples/sca-features/binding-sca/contribution-calculator/src/main/java/calculator/MultiplyServiceImpl.java new file mode 100644 index 0000000000..11f68c66e3 --- /dev/null +++ b/sca-java-2.x/trunk/samples/sca-features/binding-sca/contribution-calculator/src/main/java/calculator/MultiplyServiceImpl.java @@ -0,0 +1,38 @@ +/* + * 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 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) { + Logger logger = Logger.getLogger("calculator"); + logger.log(Level.FINEST, "Multiplying " + n1 + " with " + n2); + return n1 * n2; + } + +} |