Package ch.tocco.nice2.boot.api
Class ThreadHandlerManager
java.lang.Object
ch.tocco.nice2.boot.api.ThreadHandlerManager
Runs a
Runnable
or Callable
in a 'managed' context.
This means that all ThreadHandler
will be applied before/after
executing thr given code.
This is for example necessary to be able to get ThreadScope
beans.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(ThreadHandlerListener listener) void
removeListener
(ThreadHandlerListener listener) void
runManaged
(Runnable runnable) <T> T
runManaged
(Callable<T> callable)
-
Constructor Details
-
ThreadHandlerManager
-
-
Method Details
-
runManaged
-
runManaged
- Throws:
Exception
-
addListener
-
removeListener
-
getListeners
-