public class ThreadRenamingRunnable extends java.lang.Object implements java.lang.Runnable, RunnableContainer
Constructor and Description |
---|
ThreadRenamingRunnable(java.lang.Runnable runnable,
java.lang.String threadName,
boolean replace)
Constructs a new
ThreadRenamingRunnable . |
Modifier and Type | Method and Description |
---|---|
java.lang.Runnable |
getContainedRunnable()
Call to get the contained runnable within the wrapper.
|
void |
run() |
public ThreadRenamingRunnable(java.lang.Runnable runnable, java.lang.String threadName, boolean replace)
ThreadRenamingRunnable
. If replace
is false
the thread will be named such that threadName[originalThreadName]
.runnable
- Runnable which should be executedthreadName
- Thread name prefix, or replaced namereplace
- If true
the original name wont be included in the thread namepublic void run()
run
in interface java.lang.Runnable
public java.lang.Runnable getContainedRunnable()
RunnableContainer
getContainedRunnable
in interface RunnableContainer
null
if none is contained