Collects functions over a com.twitter.util.Closables.
Collects functions over a com.twitter.util.Closables. These functions will be passed to
the application onExit
function to be executed on graceful shutdown of the application.
A Function0 which returns Unit. It is expected that this function encapsulates awaiting on a com.twitter.util.Closable that the application would like to ensure is closed upon graceful shutdown.
closeOnExit {
val closable = ...
Await.result(
closable.close(after: Duration), timeout: Duration)
}
It is expected that the passed function is a function over a com.twitter.util.Closable.
com.twitter.util.Closable
com.twitter.util.Awaitable
=> Unit)
Invoke after external ports are bound and any clients are resolved
Invoke after external ports are bound and any clients are resolved
This method should only get singleton instances from the injector.
Invoked on graceful shutdown of the application.
Invoked on graceful shutdown of the application.
This method should only get singleton instances from the injector.
Invoked after the injector is started.
Invoked after the injector is started.
This method should only get singleton instances from the injector.
com.twitter.inject.TwitterModule to com.twitter.inject.app.App lifecycle integration.