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 aRunnable
that can be accessed viagetWrappedRunnable()
.You can check if a
Runnable
task submitted to aScheduler
(or itsScheduler.Worker
) implements this interface and unwrap the originalRunnable
instance. This could help to avoid hooking the same underlyingRunnable
task in a customRxJavaPlugins.onSchedule(Runnable)
hook set via theRxJavaPlugins.setScheduleHandler(Function)
method multiple times due to internal delegation of the defaultScheduler.scheduleDirect
orScheduler.Worker.schedule
methods.History: 2.1.7 - experimental
- Since:
- 2.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NonNull java.lang.Runnable
getWrappedRunnable()
Returns the wrapped action.
-