@Singleton public class DelegateApplicationLifecycle extends Object implements ApplicationLifecycle
| Constructor and Description |
|---|
DelegateApplicationLifecycle(play.api.inject.ApplicationLifecycle delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
addStopHook(Callable<? extends CompletionStage<?>> hook)
Add a stop hook to be called when the application stops.
|
play.api.inject.ApplicationLifecycle |
asScala() |
@Inject public DelegateApplicationLifecycle(play.api.inject.ApplicationLifecycle delegate)
public void addStopHook(Callable<? extends CompletionStage<?>> hook)
ApplicationLifecycleThe stop hook should redeem the returned future when it is finished shutting down. It is acceptable to stop immediately and return a successful future.
addStopHook in interface ApplicationLifecyclehook - the stop hook.public play.api.inject.ApplicationLifecycle asScala()
asScala in interface ApplicationLifecycle