diff options
Diffstat (limited to 'sca-java-2.x/contrib/samples/stock-comet/src/main/java/org/apache/tuscany/sca/sample/comet/PrecipitationServiceImpl.java')
-rw-r--r-- | sca-java-2.x/contrib/samples/stock-comet/src/main/java/org/apache/tuscany/sca/sample/comet/PrecipitationServiceImpl.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sca-java-2.x/contrib/samples/stock-comet/src/main/java/org/apache/tuscany/sca/sample/comet/PrecipitationServiceImpl.java b/sca-java-2.x/contrib/samples/stock-comet/src/main/java/org/apache/tuscany/sca/sample/comet/PrecipitationServiceImpl.java new file mode 100644 index 0000000000..df24a74080 --- /dev/null +++ b/sca-java-2.x/contrib/samples/stock-comet/src/main/java/org/apache/tuscany/sca/sample/comet/PrecipitationServiceImpl.java @@ -0,0 +1,16 @@ +package org.apache.tuscany.sca.sample.comet; + +import java.util.Date; +import java.util.Random; + +import org.oasisopen.sca.annotation.Service; + +@Service(PrecipitationService.class) +public class PrecipitationServiceImpl implements PrecipitationService { + + @Override + public String getPrecipitation() { + return (new Random(new Date().getTime()).nextInt(100)) + "%"; + } + +} |