public final class SingleThreadAccess extends java.lang.Object implements ISingleThreadAccess
Constructor and Description |
---|
SingleThreadAccess() |
SingleThreadAccess(IFactory<java.lang.String> threadNameFactory)
Creates a new single thread access that uses the given thread name factory for thread creation
|
SingleThreadAccess(java.lang.String threadPrefix)
Creates a new single thread access that uses the given thread name prefix for thread creation
|
SingleThreadAccess(java.util.concurrent.ThreadFactory threadFactory)
Creates a new single thread access that uses the given thread factory for thread creation
|
Modifier and Type | Method and Description |
---|---|
void |
invoke(java.lang.Runnable runnable)
Invokes a runnable in the single thread.
|
boolean |
isRunning() |
boolean |
isSingleThread() |
void |
setPaused(boolean paused)
Pauses the event pump
|
void |
setUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler uncaughtExceptionHandler) |
void |
start()
Starts the events loop
|
void |
stop()
Stops the events loop, refuses all events
|
public SingleThreadAccess()
public SingleThreadAccess(IFactory<java.lang.String> threadNameFactory)
threadNameFactory
- The thread name factory to usepublic SingleThreadAccess(java.lang.String threadPrefix)
threadPrefix
- The thread name prefix to usepublic SingleThreadAccess(java.util.concurrent.ThreadFactory threadFactory)
threadFactory
- The thread factory to usepublic boolean isSingleThread()
isSingleThread
in interface ISingleThreadAccess
public void invoke(java.lang.Runnable runnable)
ISingleThreadAccess
invoke
in interface ISingleThreadAccess
runnable
- The runnable to invokepublic void start()
public void setPaused(boolean paused)
public void stop()
public boolean isRunning()
public void setUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler uncaughtExceptionHandler)
Siehe auch Jowidgets Nutzerhandbuch