Package org.jboss.netty.util
Interface ThreadNameDeterminer
-
public interface ThreadNameDeterminerOverrides the thread name proposed byThreadRenamingRunnable.
-
-
Field Summary
Fields Modifier and Type Field Description static ThreadNameDeterminerCURRENTThreadNameDeterminerthat rejects the proposed thread name and retains the current one.static ThreadNameDeterminerPROPOSEDThreadNameDeterminerthat accepts the proposed thread name as is.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringdetermineThreadName(String currentThreadName, String proposedThreadName)Overrides the thread name proposed byThreadRenamingRunnable.
-
-
-
Field Detail
-
PROPOSED
static final ThreadNameDeterminer PROPOSED
ThreadNameDeterminerthat accepts the proposed thread name as is.
-
CURRENT
static final ThreadNameDeterminer CURRENT
ThreadNameDeterminerthat rejects the proposed thread name and retains the current one.
-
-
Method Detail
-
determineThreadName
String determineThreadName(String currentThreadName, String proposedThreadName) throws Exception
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
-
-