public abstract class Invoker extends Object
Constructor and Description |
---|
Invoker() |
Modifier and Type | Method and Description |
---|---|
void |
checkEventThread()
Throws
IllegalStateException if the current thread is not
the event thread. |
static Invoker |
getInvoker() |
abstract void |
invokeOnEventThread(Runnable r) |
protected abstract boolean |
isEventThread() |
protected boolean |
lock(ReentrantLock lock) |
abstract void |
postOnEventThread(Runnable r) |
static void |
setInvoker(Invoker invoker) |
protected boolean |
unlock(ReentrantLock lock) |
public static void setInvoker(Invoker invoker)
public static Invoker getInvoker()
protected boolean lock(ReentrantLock lock)
protected boolean unlock(ReentrantLock lock)
protected abstract boolean isEventThread()
public void checkEventThread()
IllegalStateException
if the current thread is not
the event thread.IllegalStateException
- if the current thread is not the event
threadpublic abstract void invokeOnEventThread(Runnable r)
public abstract void postOnEventThread(Runnable r)
Copyright © 2020. All rights reserved.