package server
- Alphabetic
- Public
- All
Type Members
-
abstract
class
AbstractTwitterServer extends TwitterServer
AbstractTwitterServer for usage from Java
- trait Ports extends server.TwitterServer
-
trait
TwitterServer extends App with server.TwitterServer with DeprecatedLogging with Ports with Warmup with Logging
A com.twitter.server.TwitterServer that supports injection and com.twitter.inject.TwitterModule modules.
A com.twitter.server.TwitterServer that supports injection and com.twitter.inject.TwitterModule modules.
To use, override the appropriate @Lifecycle and callback method(s). Make sure when overriding
@Lifecycle
methods to call the super implementation, otherwise critical lifecycle set-up may not occur causing your server to either function improperly or outright fail.
If you are extending this trait, to implement your server, override the start() function, e.g.,
import com.twitter.inject.server.TwitterServer object MyServerMain extends MyServer class MyServer extends TwitterServer { override protected def start(): Unit = { // YOUR CODE HERE await(someAwaitable) } }
Note, you do not need to await on the
adminHttpServeras this is done for you by the framework.Server Lifecycle: +-------------------------------------------------------------------------+
Life Cycle Method
Ancillary Function(s)
loadModules()
modules.postInjectorStartup()
foreach.singletonStartup()
postInjectorStartup()
resolveFinagleClientsOnStartup(),
setup()
warmup()
beforePostWarmup()
LifeCycle.Warmup.prebindWarmup()
postWarmup() (binds ext ports)
disable or announce admin server
afterpostwarmup()
LifeCycle.Warmup.warmupComplete()
setAppStarted()
run()
start()
Await on awaitables
@Lifecycle }}} occur causing your server to either function improperly or outright fail.
If you are extending this trait, to implement your server, override the start() function, e.g.,
import com.twitter.inject.server.TwitterServer object MyServerMain extends MyServer class MyServer extends TwitterServer { override protected def start(): Unit = { // YOUR CODE HERE await(someAwaitable) } }
Note, you do not need to await on the
adminHttpServeras this is done for you by the framework.Server Lifecycle: +-------------------------------------------------------------------------+
Life Cycle Method
Ancillary Function(s)
loadModules()
modules.postInjectorStartup()
foreach.singletonStartup()
postInjectorStartup()
resolveFinagleClientsOnStartup(),
setup()
warmup()
beforePostWarmup()
LifeCycle.Warmup.prebindWarmup()
postWarmup() (binds ext ports)
disable or announce admin server
afterpostwarmup()
LifeCycle.Warmup.warmupComplete()
setAppStarted()
run()
start()
Await on awaitables