/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
- /**
- * Razvan's public code. Copyright 2008 based on Apache license (share alike) see LICENSE.txt for
- * details. No warranty implied nor any liability assumed for this code.
- */
- package com.razie.pub.agent.test;
-
- import com.razie.pub.agent.AgentService;
- import com.razie.pub.base.log.Log;
- import com.razie.pub.lightsoa.SoaMethod;
- import com.razie.pub.lightsoa.SoaService;
-
- /**
- * sample agent service in java
- *
- * @author razvanc
- */
- @SoaService(name = "samplejavaservice", bindings = { "http" }, descr = "sample in java")
- public class SampleJavaService extends AgentService {
-
- protected void onStartup() {
- Log.logThis("SampleJavaService onStartup()");
- }
-
- protected void onShutdown() {
- Log.logThis("SampleJavaService onShutdown()");
- }
-
- @SoaMethod(descr = "echo with args", args = { "msg" })
- public String echo1(String msg) {
- return "echo1: " + msg;
- }
-
- @SoaMethod(descr = "echo no args")
- public String echo2() {
- return "echo2...";
- }
- }