diff options
Diffstat (limited to '')
-rw-r--r-- | sca-java-2.x/trunk/contrib/samples/async/sample-contribution-implementation-java-calculator-async/src/main/java/calculator/CalculatorServiceAsyncImpl.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/contrib/samples/async/sample-contribution-implementation-java-calculator-async/src/main/java/calculator/CalculatorServiceAsyncImpl.java b/sca-java-2.x/trunk/contrib/samples/async/sample-contribution-implementation-java-calculator-async/src/main/java/calculator/CalculatorServiceAsyncImpl.java new file mode 100644 index 0000000000..18a982f4d6 --- /dev/null +++ b/sca-java-2.x/trunk/contrib/samples/async/sample-contribution-implementation-java-calculator-async/src/main/java/calculator/CalculatorServiceAsyncImpl.java @@ -0,0 +1,15 @@ +package calculator; + +import org.oasisopen.sca.ResponseDispatch; + +public class CalculatorServiceAsyncImpl implements CalculatorServiceAsync { + + @Override + public void calculateAsync(Integer n1, ResponseDispatch<String> response) { + int result = n1 + n1; + String retval = "async service invoked: " + n1 + " + " + n1 + " = " + result; + + response.sendResponse(retval); + } + +} |