public final class Shutdown
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT
The default priority.
|
static int |
EARLIER
The default priority for operations that should be performed very early
in the sequence.
|
static int |
EARLY
The default priority for operations that should be performed rather early
in the sequence.
|
static int |
FIRST
The highest possible priority.
|
static int |
LAST
The lowest possible priority.
|
static int |
LATE
The default priority for operations that should be performed rather late
in the sequence.
|
static int |
LATER
The default priority for operations that should be performed very late in
the sequence.
|
| Constructor and Description |
|---|
Shutdown()
Creates a new Shutdown instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(java.lang.Runnable r)
adds a
Runnable with default priority (0) to the shutdown
system. |
void |
add(java.lang.Runnable r,
double priority) |
static Shutdown |
getDefaultShutdown()
Provides a global Shutdown handler.
|
public static final int DEFAULT
add(Runnable),
#add(Runnable, int),
Constant Field Valuespublic static final int EARLIER
#add(Runnable, int),
Constant Field Valuespublic static final int EARLY
#add(Runnable, int),
Constant Field Valuespublic static final int FIRST
#add(Runnable, int),
Constant Field Valuespublic static final int LAST
#add(Runnable, int),
Constant Field Valuespublic static final int LATE
#add(Runnable, int),
Constant Field Valuespublic static final int LATER
#add(Runnable, int),
Constant Field Valuespublic Shutdown()
public static Shutdown getDefaultShutdown()
public boolean add(java.lang.Runnable r)
Runnable with default priority (0) to the shutdown
system.java.lang.NullPointerException - if the r argument is nullpublic void add(java.lang.Runnable r,
double priority)
java.lang.NullPointerException - if the r argument is null
1.3Copyright © 2018. All Rights Reserved.