public class ComponentMainThreadExecutorServiceAdapter extends ScheduledExecutorServiceAdapter implements ComponentMainThreadExecutor
ScheduledExecutorService which shall be used as a
ComponentMainThreadExecutor. It enhances the given executor with an assert that the current thread is the
main thread of the executor.ComponentMainThreadExecutor.DummyComponentMainThreadExecutor| Constructor and Description |
|---|
ComponentMainThreadExecutorServiceAdapter(ScheduledExecutorService scheduledExecutorService,
Runnable mainThreadCheck) |
| Modifier and Type | Method and Description |
|---|---|
void |
assertRunningInMainThread()
Returns true if the method was called in the thread of this executor.
|
execute, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelayclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitschedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelaypublic ComponentMainThreadExecutorServiceAdapter(@Nonnull ScheduledExecutorService scheduledExecutorService, @Nonnull Runnable mainThreadCheck)
public void assertRunningInMainThread()
ComponentMainThreadExecutorassertRunningInMainThread in interface ComponentMainThreadExecutorCopyright © 2014–2019 The Apache Software Foundation. All rights reserved.