Java tutorial
//package com.java2s; //License from project: Apache License import java.util.concurrent.Callable; public class Main { public static Callable<Object> getCallable(final int seconds) { return new Callable<Object>() { @Override public Object call() throws Exception { Thread.sleep(seconds * 1000); return seconds + "s pause finished"; } }; } }