/** * Create a {@link Task} that can be scheduled for execution in * the transport thread. * * @return the newly created Task * @param cmd what to run when the task is executed **/ public Task createTask(Runnable cmd) { return new Task(scheduler, cmd); }