Returns the enum constant of this class with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this class. (Extraneous whitespace characters are
not permitted.)
Parameters:
name - the name of the enum constant to be returned.
Utility method to detect whether a thread is a network thread. Typically
used in assertions to make sure that we do not call blocking code from
networking threads.
isTransportThread
public staticbooleanisTransportThread(String threadName)
Utility method to detect whether a thread is a network thread. Typically
used in assertions to make sure that we do not call blocking code from
networking threads.
Parameters:
threadName - the name of the thread
assertTransportThread
public staticbooleanassertTransportThread()
assertNotTransportThread
public staticbooleanassertNotTransportThread(String reason)
assertDefaultThreadContext
public staticbooleanassertDefaultThreadContext(ThreadContext threadContext)