PageRenderTime 53ms CodeModel.GetById 48ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/razpub/test_src/com/razie/pub/agent/test/SampleJavaService.java

http://razpub.googlecode.com/
Java | 37 lines | 22 code | 6 blank | 9 comment | 0 complexity | b5721999d06a15896992e5f9048ba9b1 MD5 | raw file
 1/**
 2 * Razvan's public code. Copyright 2008 based on Apache license (share alike) see LICENSE.txt for
 3 * details. No warranty implied nor any liability assumed for this code.
 4 */
 5package com.razie.pub.agent.test;
 6
 7import com.razie.pub.agent.AgentService;
 8import com.razie.pub.base.log.Log;
 9import com.razie.pub.lightsoa.SoaMethod;
10import com.razie.pub.lightsoa.SoaService;
11
12/**
13 * sample agent service in java
14 * 
15 * @author razvanc
16 */
17@SoaService(name = "samplejavaservice", bindings = { "http" }, descr = "sample in java")
18public class SampleJavaService extends AgentService {
19
20    protected void onStartup() {
21        Log.logThis("SampleJavaService onStartup()");
22    }
23
24    protected void onShutdown() {
25        Log.logThis("SampleJavaService onShutdown()");
26    }
27
28    @SoaMethod(descr = "echo with args", args = { "msg" })
29    public String echo1(String msg) {
30        return "echo1: " + msg;
31    }
32
33    @SoaMethod(descr = "echo no args")
34    public String echo2() {
35        return "echo2...";
36    }
37}