Package org.jboss.netty.util
Interface ThreadNameDeterminer
-
public interface ThreadNameDeterminer
Overrides the thread name proposed byThreadRenamingRunnable
.
-
-
Field Summary
Fields Modifier and Type Field Description static ThreadNameDeterminer
CURRENT
ThreadNameDeterminer
that rejects the proposed thread name and retains the current one.static ThreadNameDeterminer
PROPOSED
ThreadNameDeterminer
that accepts the proposed thread name as is.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
determineThreadName(java.lang.String currentThreadName, java.lang.String proposedThreadName)
Overrides the thread name proposed byThreadRenamingRunnable
.
-
-
-
Field Detail
-
PROPOSED
static final ThreadNameDeterminer PROPOSED
ThreadNameDeterminer
that accepts the proposed thread name as is.
-
CURRENT
static final ThreadNameDeterminer CURRENT
ThreadNameDeterminer
that rejects the proposed thread name and retains the current one.
-
-
Method Detail
-
determineThreadName
java.lang.String determineThreadName(java.lang.String currentThreadName, java.lang.String proposedThreadName) throws java.lang.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
null
is returned, the proposed thread name is discarded (i.e. no rename). - Throws:
java.lang.Exception
-
-