Class SoundTaskExecutor
- java.lang.Object
-
- com.realtime.crossfire.jxclient.sound.SoundTaskExecutor
-
public class SoundTaskExecutor extends java.lang.ObjectExecutes non-blocking tasks for sound-related functions. All tasks are executed as fast as possible and from a single thread.
-
-
Constructor Summary
Constructors Constructor Description SoundTaskExecutor()Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute(@NotNull java.lang.Runnable task)Schedules a task for execution.voidexecuteAndWait(@NotNull java.lang.Runnable task)Schedules a task for execution.voidstart()Activates this instance.
-
-
-
Method Detail
-
start
public void start()
Activates this instance.
-
execute
public void execute(@NotNull @NotNull java.lang.Runnable task)Schedules a task for execution. The task must not block as all tasks are executed in the same thread.- Parameters:
task- the task
-
executeAndWait
public void executeAndWait(@NotNull @NotNull java.lang.Runnable task) throws java.lang.InterruptedExceptionSchedules a task for execution. The task must not block as all tasks are executed in the same thread.- Parameters:
task- the task- Throws:
java.lang.InterruptedException- if the current thread was interrupted while waiting for the shutdown
-
-