Package org.eclipse.jetty.util.component
Class Graceful.Shutdown
- java.lang.Object
-
- org.eclipse.jetty.util.component.Graceful.Shutdown
-
- All Implemented Interfaces:
Graceful
- Enclosing interface:
- Graceful
public static class Graceful.Shutdown extends java.lang.Object implements Graceful
A utility Graceful that uses aFutureCallback
to indicate if shutdown is completed. By default theFutureCallback
is returned as already completed, but thenewShutdownCallback()
method can be overloaded to return a non-completed callback that will require aCallback.succeeded()
orCallback.failed(Throwable)
call to be completed.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Graceful
Graceful.Shutdown
-
-
Constructor Summary
Constructors Constructor Description Shutdown()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel()
FutureCallback
get()
boolean
isShutdown()
protected FutureCallback
newShutdownCallback()
java.util.concurrent.Future<java.lang.Void>
shutdown()
-
-
-
Method Detail
-
newShutdownCallback
protected FutureCallback newShutdownCallback()
-
shutdown
public java.util.concurrent.Future<java.lang.Void> shutdown()
-
isShutdown
public boolean isShutdown()
- Specified by:
isShutdown
in interfaceGraceful
-
cancel
public void cancel()
-
get
public FutureCallback get()
-
-