public enum ShutdownActionRegister extends java.lang.Enum<ShutdownActionRegister> implements java.lang.AutoCloseable
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Field and Description |
---|---|
private java.util.List<java.lang.AutoCloseable> |
actions |
private static org.slf4j.Logger |
log |
Modifier and Type | Method and Description |
---|---|
void |
addAction(java.lang.AutoCloseable shutdownHookAction) |
void |
close() |
static ShutdownActionRegister |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ShutdownActionRegister[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ShutdownActionRegister INSTANCE
private static final org.slf4j.Logger log
private java.util.List<java.lang.AutoCloseable> actions
public static ShutdownActionRegister[] values()
for (ShutdownActionRegister c : ShutdownActionRegister.values()) System.out.println(c);
public static ShutdownActionRegister 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 nullpublic void addAction(java.lang.AutoCloseable shutdownHookAction)
public void close() throws java.lang.Exception
close
in interface java.lang.AutoCloseable
java.lang.Exception