java.lang.Object
org.glassfish.grizzly.filterchain.ShutdownEvent
- All Implemented Interfaces:
FilterChainEvent
An event that
Filter
implementations may listen for if special processing is required during a graceful
shutdown.- Since:
- 2.4.0
-
Field Summary
-
Constructor Summary
ConstructorDescriptionShutdownEvent
(long gracePeriod, TimeUnit timeUnit) Create a newShutdownEvent
with the grace period for the shutdown. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addShutdownTask
(Callable<Filter> future) Adds a task to this event.long
type()
-
Field Details
-
TYPE
-
-
Constructor Details
-
ShutdownEvent
Create a newShutdownEvent
with the grace period for the shutdown.
-
-
Method Details
-
type
- Specified by:
type
in interfaceFilterChainEvent
-
addShutdownTask
Adds a task to this event. Tasks should be called on separate threads after allFilter
s in the chain have been notified of the impending shutdown. -
getShutdownTasks
-
getGracePeriod
public long getGracePeriod()- Returns:
- the shutdown grace period.
-
getTimeUnit
- Returns:
- the
TimeUnit
of the grace period.
-