Class BlockingWork
- java.lang.Object
-
- com.inductiveautomation.perspective.gateway.threading.BlockingWork
-
public class BlockingWork extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BlockingWork.NoBlockingWorkAllowedException
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
begin()
Assertion checks to see if the current thread allows blocking work.static void
setBlockingWorkAllowed(boolean allowed)
static java.util.concurrent.ThreadFactory
wrapThreadFactory(java.util.concurrent.ThreadFactory delegate)
Wraps a thread factory to allow blocking work.
-
-
-
Method Detail
-
begin
public 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.
-
setBlockingWorkAllowed
public static void setBlockingWorkAllowed(boolean allowed)
-
wrapThreadFactory
public static java.util.concurrent.ThreadFactory wrapThreadFactory(java.util.concurrent.ThreadFactory delegate)
Wraps a thread factory to allow blocking work.
-
-