Interface ThreadNameDeterminer
public interface ThreadNameDeterminer
Overrides the thread name proposed by
ThreadRenamingRunnable.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ThreadNameDeterminerThreadNameDeterminerthat rejects the proposed thread name and retains the current one.static final ThreadNameDeterminerThreadNameDeterminerthat accepts the proposed thread name as is. -
Method Summary
Modifier and TypeMethodDescriptiondetermineThreadName(String currentThreadName, String proposedThreadName) Overrides the thread name proposed byThreadRenamingRunnable.
-
Field Details
-
PROPOSED
ThreadNameDeterminerthat accepts the proposed thread name as is. -
CURRENT
ThreadNameDeterminerthat rejects the proposed thread name and retains the current one.
-
-
Method Details
-
determineThreadName
Overrides the thread name proposed byThreadRenamingRunnable.- Parameters:
currentThreadName- the current thread nameproposedThreadName- the proposed new thread name- Returns:
- the actual new thread name.
If
nullis returned, the proposed thread name is discarded (i.e. no rename). - Throws:
Exception
-