Package io.reactivex.rxjava3.schedulers
Interface SchedulerRunnableIntrospection
- All Known Implementing Classes:
AbstractDirectTask,ExecutorScheduler.DelayedRunnable,ScheduledDirectPeriodicTask,ScheduledDirectTask,Scheduler.DisposeTask,Scheduler.PeriodicDirectTask,Scheduler.Worker.PeriodicTask
public interface SchedulerRunnableIntrospection
Interface to indicate the implementor class wraps a
Runnable that can
be accessed via getWrappedRunnable().
You can check if a Runnable task submitted to a Scheduler (or its
Scheduler.Worker) implements this interface and unwrap the
original Runnable instance. This could help to avoid hooking the same underlying Runnable
task in a custom RxJavaPlugins.onSchedule(Runnable) hook set via
the RxJavaPlugins.setScheduleHandler(Function) method multiple times due to internal delegation
of the default Scheduler.scheduleDirect or Scheduler.Worker.schedule methods.
History: 2.1.7 - experimental
- Since:
- 2.2
-
Method Summary
Modifier and TypeMethodDescriptionReturns the wrapped action.
-
Method Details
-
getWrappedRunnable
Returns the wrapped action.- Returns:
- the wrapped action. Cannot be null.
-