Replace Java Runnable interface by our own interface