public class ShutdownEvent extends java.lang.Object implements FilterChainEvent
Filter implementations may listen for if special processing is required
during a graceful shutdown.| Modifier and Type | Field and Description |
|---|---|
static java.lang.Object |
TYPE |
| Constructor and Description |
|---|
ShutdownEvent(long gracePeriod,
java.util.concurrent.TimeUnit timeUnit)
Create a new
ShutdownEvent with the grace period for the shutdown. |
| Modifier and Type | Method and Description |
|---|---|
void |
addShutdownTask(java.util.concurrent.Callable<Filter> future)
Adds a task to this event.
|
long |
getGracePeriod() |
java.util.Set<java.util.concurrent.Callable<Filter>> |
getShutdownTasks() |
java.util.concurrent.TimeUnit |
getTimeUnit() |
java.lang.Object |
type() |
public ShutdownEvent(long gracePeriod,
java.util.concurrent.TimeUnit timeUnit)
ShutdownEvent with the grace period for the shutdown.public java.lang.Object type()
type in interface FilterChainEventpublic void addShutdownTask(java.util.concurrent.Callable<Filter> future)
Filters in the
chain have been notified of the impending shutdown.public java.util.Set<java.util.concurrent.Callable<Filter>> getShutdownTasks()
Set of Callable instances that need to be
checked in order to proceed with terminating processing.public long getGracePeriod()
public java.util.concurrent.TimeUnit getTimeUnit()
TimeUnit of the grace period.Copyright © 2018 Oracle Corporation. All Rights Reserved.