Class BlockingWork
java.lang.Object
com.inductiveautomation.perspective.gateway.threading.BlockingWork
- 
Nested Class SummaryNested Classes
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidbegin()Assertion checks to see if the current thread allows blocking work.static <E extends Throwable>
 voidinvokeBlockingTask(FragileRunnable<E> runnable) Invokes a task that is expected to perform blocking work.static voidsetBlockingWorkAllowed(boolean allowed) static ThreadFactorywrapThreadFactory(ThreadFactory delegate) Wraps a thread factory to allow blocking work.
- 
Method Details- 
beginpublic static void begin()Assertion checks to see if the current thread allows blocking work. Throws if not allowed.- Throws:
- BlockingWork.NoBlockingWorkAllowedException- if blocking work not allowed on calling thread.
 
- 
setBlockingWorkAllowedpublic static void setBlockingWorkAllowed(boolean allowed) 
- 
invokeBlockingTaskInvokes a task that is expected to perform blocking work. Leaves the state of the thread's blocking work policy unchanged.- Throws:
- E extends Throwable
 
- 
wrapThreadFactoryWraps a thread factory to allow blocking work.
 
-