/**
 * Copyright 2010-2015 Ralph Schaer <ralphschaer@gmail.com>
 *
 * Licensed 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 ch.rasc.extdirectspring.demo;

import java.util.concurrent.TimeUnit;

import org.springframework.stereotype.Service;

import ch.ralscha.extdirectspring.annotation.ExtDirectMethod;

@Service
public class TestAction {

	@ExtDirectMethod(group = "example")
	public long multiply(Long num) {
		if (num != null) {
			return num * 8;
		}
		return 0;
	}

	@ExtDirectMethod(group = "example")
	public String doEcho(String message) {
		return message;
	}
	
	@ExtDirectMethod(group = "example")
	public int oneMinuteRunning(int a) throws InterruptedException {
		TimeUnit.MINUTES.sleep(1);
		return a+1;
	}

}

/**
 * Copyright 2010-2015 Ralph Schaer <ralphschaer@gmail.com>
 *
 * Licensed 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 ch.rasc.extdirectspring.demo;

import org.springframework.stereotype.Service;

import ch.ralscha.extdirectspring.annotation.ExtDirectMethod;

@Service
public class TestAction {

	@ExtDirectMethod(group = "example")
	public long multiply(Long num) {
		if (num != null) {
			return num * 8;
		}
		return 0;
	}

	@ExtDirectMethod(group = "example")
	public String doEcho(String message) {
		return message;
	}

}

--- 
+++ 
@@ -14,6 +14,8 @@
  * limitations under the License.
  */
 package ch.rasc.extdirectspring.demo;
+
+import java.util.concurrent.TimeUnit;
 
 import org.springframework.stereotype.Service;
 
@@ -34,5 +36,11 @@
 	public String doEcho(String message) {
 		return message;
 	}
+	
+	@ExtDirectMethod(group = "example")
+	public int oneMinuteRunning(int a) throws InterruptedException {
+		TimeUnit.MINUTES.sleep(1);
+		return a+1;
+	}
 
 }
Add a long running method for testing