public enum ThreadPolicy extends java.lang.Enum<ThreadPolicy>
Enum Constant and Description |
---|
CURRENT
Run the command in the current Thread, whichever Thread that may be.
|
FORK
Run the command in a freshly spawned Thread.
|
QUEUE
Queue the command for execution.
|
SINGLE
Run all invocations of the command in a single dedicated Thread.
|
SWING
Run the command in the Swing event Thread.
|
Modifier and Type | Method and Description |
---|---|
static ThreadPolicy |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ThreadPolicy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ThreadPolicy SINGLE
SingleThreadInterruptedException
when appropriate.public static final ThreadPolicy SWING
public static final ThreadPolicy FORK
public static final ThreadPolicy QUEUE
public static final ThreadPolicy CURRENT
public static ThreadPolicy[] values()
for (ThreadPolicy c : ThreadPolicy.values()) System.out.println(c);
public static ThreadPolicy valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null