Packages

trait HttpServer extends HttpServerTrait

A Finagle server which exposes external HTTP or HTTPS interfaces implemented by a Service[Request, Response] configured via an HttpRouter. This trait is intended for use from Scala or with generated Scala code.

Note

Java users are encouraged to use AbstractHttpServer instead.

Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. HttpServer
  2. HttpServerTrait
  3. TwitterServer
  4. Warmup
  5. Ports
  6. DeprecatedLogging
  7. Logging
  8. TwitterServer
  9. Lifecycle
  10. AdminHttpServer
  11. Hooks
  12. DtabFlags
  13. Linters
  14. Stats
  15. App
  16. Logging
  17. Slf4jBridge
  18. App
  19. Lifecycle
  20. CloseOnceAwaitably
  21. CloseOnceAwaitably0
  22. Awaitable
  23. ClosableOnce
  24. CloseOnce
  25. Closable
  26. AnyRef
  27. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def configureHttp(router: HttpRouter): Unit

    Users MUST provide an implementation to configure the provided HttpRouter.

    Users MUST provide an implementation to configure the provided HttpRouter. The HttpRouter exposes a DSL which results in a configured Finagle Service[-Request, +Response] to serve on the ListeningServer.

    router

    the HttpRouter to configure.

    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final val MinGrace: Duration
    Definition Classes
    App
  5. def accessLogModule: Module

    Default com.twitter.inject.TwitterModule for providing a com.twitter.finagle.filter.LogFormatter.

  6. def addAdminRoute(route: Route): Unit
    Definition Classes
    AdminHttpServer
  7. def addAdminRoutes(newRoutes: Seq[Route]): Unit
    Definition Classes
    AdminHttpServer
  8. def addDtabs(): Unit
    Definition Classes
    DtabFlags
  9. def addFrameworkModule(module: Module): Unit

    ONLY INTENDED FOR USE BY THE FRAMEWORK.

    ONLY INTENDED FOR USE BY THE FRAMEWORK.

    Default modules can be overridden in production by overriding methods in your App or Server.

    We take special care to make sure the module is not null, since a common bug is overriding the default methods using a val instead of a def

    Attributes
    protected[twitter]
    Definition Classes
    App
  10. def addFrameworkModules(modules: Module*): Unit

    ONLY INTENDED FOR USE BY THE FRAMEWORK.

    ONLY INTENDED FOR USE BY THE FRAMEWORK.

    Attributes
    protected[twitter]
    Definition Classes
    App
  11. def addFrameworkOverrideModules(modules: Module*): Unit

    ONLY INTENDED FOR USE BY THE FRAMEWORK.

    ONLY INTENDED FOR USE BY THE FRAMEWORK.

    Attributes
    protected[inject]
    Definition Classes
    App
  12. def adminBoundAddress: InetSocketAddress
    Definition Classes
    AdminHttpServer
  13. val adminHttpServer: ListeningServer
    Attributes
    protected
    Definition Classes
    AdminHttpServer
    Annotations
    @volatile()
  14. val adminPort: Flag[InetSocketAddress]
    Definition Classes
    AdminHttpServer
  15. def afterPostWarmup(): Unit

    After postWarmup, all external servers have been started, and we can now enable our health endpoint.

    After postWarmup, all external servers have been started, and we can now enable our health endpoint.

    Attributes
    protected
    Definition Classes
    TwitterServerApp
    Annotations
    @Lifecycle()
    Note

    You MUST call super.afterPostWarmup() in any overridden definition of this method. Failure to do so may cause your server to not completely startup.

    ,

    It is NOT expected that you block in this method as you will prevent completion of the server lifecycle.

    See also

    com.twitter.server.Lifecycle.Warmup#warmupComplete

    com.twitter.inject.app.App#afterPostwarmup

  16. def allowUndefinedFlags: Boolean
    Attributes
    protected
    Definition Classes
    App
  17. val appendFlag: Flag[Boolean]
    Attributes
    protected[this]
    Definition Classes
    Logging
  18. def args: Array[String]
    Definition Classes
    App
  19. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  20. val asyncFlag: Flag[Boolean]
    Attributes
    protected[this]
    Definition Classes
    Logging
  21. val asyncMaxSizeFlag: Flag[Int]
    Attributes
    protected[this]
    Definition Classes
    Logging
  22. def await(awaitables: Awaitable[_]*): Unit

    Callback to register multiple Awaitable instances for the server to await (block) on.

    Callback to register multiple Awaitable instances for the server to await (block) on.

    awaitables

    vararg list of Awaitable instances to register.

    Attributes
    protected
    Definition Classes
    TwitterServer
    See also

    Awaitable)

  23. def await[T <: Awaitable[_]](awaitable: T): Unit

    Callback to register an Awaitable instance for the server to await (block) on.

    Callback to register an Awaitable instance for the server to await (block) on.

    All registered Awaitable instances are entangled by the server such that if any registered Awaitable exits it will trigger all registered Awaitable instances to exit.

    awaitable

    an Awaitable instance to register.

    Attributes
    protected
    Definition Classes
    TwitterServer
    See also

    Awaiting Awaitables

  24. def beforePostWarmup(): Unit

    After warmup but before accepting traffic promote to old gen (which triggers gc).

    After warmup but before accepting traffic promote to old gen (which triggers gc).

    Attributes
    protected
    Definition Classes
    TwitterServerApp
    Annotations
    @Lifecycle()
    Note

    You MUST call super.beforePostWarmup() in any overridden definition of this method. Failure to do so may cause your server to not completely startup.

    ,

    It is NOT expected that you block in this method as you will prevent completion of the server lifecycle.

    See also

    com.twitter.server.Lifecycle.Warmup#prebindWarmup

    com.twitter.inject.app.App#beforePostWarmup

  25. def buildHttpListeningServer(addr: InetSocketAddress, server: Server): ListeningServer

    Serve the Service[-Request, +Response] from the configured HttpRouter.

    Serve the Service[-Request, +Response] from the configured HttpRouter.

    addr

    the InetSocketAddress address to bind the resultant ListeningServer.

    server

    the configured Http.Server stack.

    returns

    a constructed HTTP ListeningServer.

    Attributes
    protected
    Definition Classes
    HttpServerHttpServerTrait
  26. def buildHttpsListeningServer(addr: InetSocketAddress, server: Server): ListeningServer

    Serve the Service[-Request, +Response] from the configured HttpRouter.

    Serve the Service[-Request, +Response] from the configured HttpRouter.

    addr

    the InetSocketAddress address to bind the resultant ListeningServer.

    server

    the configured Http.Server stack.

    returns

    a constructed HTTPS ListeningServer.

    Attributes
    protected
    Definition Classes
    HttpServerHttpServerTrait
  27. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  28. final def close(deadline: Time): Future[Unit]
    Definition Classes
    CloseOnce → Closable
  29. def close(after: Duration): Future[Unit]
    Definition Classes
    Closable
  30. final def close(): Future[Unit]
    Definition Classes
    Closable
  31. final def closeFuture: Future[Unit]
    Attributes
    protected
    Definition Classes
    CloseOnce
  32. final def closeOnExit(closable: Closable): Unit
    Definition Classes
    App
  33. final def closeOnExitLast(closable: Closable): Unit
    Definition Classes
    App
  34. def closeOnce(deadline: Time): Future[Unit]
    Attributes
    protected
    Definition Classes
    App → CloseOnce
  35. def configureAdminHttpServer(server: Server): Server
    Attributes
    protected
    Definition Classes
    AdminHttpServer
  36. def configureHttpServer(server: Server): Server

    This method allows for further configuration of the http server for parameters not exposed by this trait or for overriding defaults provided herein, e.g.,

    This method allows for further configuration of the http server for parameters not exposed by this trait or for overriding defaults provided herein, e.g.,

    override def configureHttpServer(server: Http.Server): Http.Server = { server .withMaxInitialLineSize(2048) }

    server

    - the com.twitter.finagle.Http.Server to configure.

    returns

    a configured Http.Server.

    Attributes
    protected
    Definition Classes
    HttpServerTrait
  37. def configureHttpsServer(server: Server): Server

    This method allows for further configuration of the https server for parameters not exposed by this trait or for overriding defaults provided herein, e.g.,

    This method allows for further configuration of the https server for parameters not exposed by this trait or for overriding defaults provided herein, e.g.,

    override def configureHttpsServer(server: Http.Server): Http.Server = { server .withMaxInitialLineSize(2048) .withTransport.tls(....) }

    server

    - the com.twitter.finagle.Http.Server to configure.

    returns

    a configured Http.Server.

    Attributes
    protected
    Definition Classes
    HttpServerTrait
  38. def configureLoggerFactories(): Unit

    com.twitter.logging.Logging.configureLoggerFactories() removes all added JUL handlers and adds only handlers defined by com.twitter.logging.Logging.loggerFactories.

    com.twitter.logging.Logging.configureLoggerFactories() removes all added JUL handlers and adds only handlers defined by com.twitter.logging.Logging.loggerFactories.

    Logging.configureLoggerFactories would thus remove the installed SLF4J BridgeHandler from com.twitter.server.TwitterServer. Therefore, we override with a no-op to prevent the SLF4J BridgeHandler from being removed.

    Attributes
    protected
    Definition Classes
    DeprecatedLogging → Logging
    Note

    Subclasses MUST override this method with an implementation that configures the com.twitter.logging.Logger if they want to use their configured logger factories via the util-logging style of configuration.

    See also

    jul-to-slf4j bridge

  39. def debug(marker: Marker, message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  40. def debug(message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  41. def debug(marker: Marker, message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  42. def debug(message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  43. def debugResult[T](message: => String)(fn: => T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  44. def defaultAdminPort: Int
    Definition Classes
    AdminHttpServer
  45. def defaultAppend: Boolean
    Definition Classes
    Logging
  46. def defaultCloseGracePeriod: Duration
    Definition Classes
    App
  47. def defaultFormatter: Formatter
    Definition Classes
    Logging
  48. def defaultHttpAnnouncement: String

    Default server announcement String for the HTTP server used as the Flag default value for httpAnnounceFlag.

    Default server announcement String for the HTTP server used as the Flag default value for httpAnnounceFlag. This can be overridden to provide a different default programmatically when a flag value cannot be passed. An empty String value is an indication to not perform any announcement of the server.

    In general, users should prefer setting the httpAnnounceFlag Flag value.

    Attributes
    protected
    Definition Classes
    HttpServerTrait
    See also

    String)

  49. def defaultHttpPort: String

    Default external HTTP port used as the Flag default value for httpPortFlag.

    Default external HTTP port used as the Flag default value for httpPortFlag. This can be overridden to provide a different default programmatically when a flag value cannot be passed. The format of this value is expected to be a String in the form of ":port".

    In general, users should prefer setting the httpPortFlag Flag value.

    Attributes
    protected
    Definition Classes
    HttpServerTrait
    See also

    com.twitter.finatra.http.HttpServerTrait.httpPortFlag

  50. def defaultHttpServerName: String

    Default server name for the external HTTP interface used as the Flag default value for httpServerNameFlag.

    Default server name for the external HTTP interface used as the Flag default value for httpServerNameFlag. This can be overridden to provide a different default programmatically when a flag value cannot be passed.

    In general, users should prefer setting the httpServerNameFlag Flag value.

    Attributes
    protected
    Definition Classes
    HttpServerTrait
    See also

    com.twitter.finatra.http.HttpServerTrait.httpServerNameFlag

  51. def defaultHttpsAnnouncement: String

    Default server announcement String for the HTTPS server used as the Flag default value for httpsAnnounceFlag.

    Default server announcement String for the HTTPS server used as the Flag default value for httpsAnnounceFlag. This can be overridden to provide a different default programmatically when a flag value cannot be passed. An empty String value is an indication to not perform any announcement of the server.

    In general, users should prefer setting the httpsAnnounceFlag Flag value.

    Attributes
    protected
    Definition Classes
    HttpServerTrait
    See also

    String)

  52. def defaultHttpsPort: String

    Default external HTTPS port used as the Flag default value for httpsPortFlag.

    Default external HTTPS port used as the Flag default value for httpsPortFlag. This can be overridden to provide a different default programmatically when a flag value cannot be passed. The format of this value is expected to be a String in the form of ":port".

    In general, users should prefer setting the httpsPortFlag Flag value.

    Attributes
    protected
    Definition Classes
    HttpServerTrait
    See also

    com.twitter.finatra.http.HttpServerTrait.httpsPortFlag

  53. def defaultHttpsServerName: String

    Default server name for serving the external HTTPS interface used as the Flag default value for httpsServerNameFlag.

    Default server name for serving the external HTTPS interface used as the Flag default value for httpsServerNameFlag. This can be overridden to provide a different default programmatically when a flag value cannot be passed.

    In general, users should prefer setting the httpsServerNameFlag Flag value.

    Attributes
    protected
    Definition Classes
    HttpServerTrait
    See also

    com.twitter.finatra.http.HttpServerTrait.httpsServerNameFlag

  54. def defaultLogLevel: Level
    Definition Classes
    Logging
  55. def defaultMaxRequestSize: StorageUnit

    Default maximum request message size this server can receive used as the Flag default value for maxRequestSizeFlag.

    Default maximum request message size this server can receive used as the Flag default value for maxRequestSizeFlag. This can be overridden to provide a different default programmatically when a flag value cannot be passed. The format of this flag is expected to be a String which is parsable into a com.twitter.util.StorageUnit.

    In general, users should prefer setting the maxRequestSizeFlag Flag value.

    Attributes
    protected
    Definition Classes
    HttpServerTrait
    See also

    com.twitter.util.StorageUnit

    com.twitter.finagle.Http.Server.withMaxRequestSize

    com.twitter.finatra.http.HttpServerTrait.maxRequestSizeFlag

  56. def defaultOutput: String
    Definition Classes
    Logging
  57. def defaultRollPolicy: Policy
    Definition Classes
    Logging
  58. def defaultRotateCount: Int
    Definition Classes
    Logging
  59. def defaultShutdownTimeout: Duration

    Default shutdown timeout used as the Flag default value for shutdownTimeoutFlag.

    Default shutdown timeout used as the Flag default value for shutdownTimeoutFlag. This represents the deadline for the closing of this server which can be overridden to provide a different default programmatically when a flag value cannot be passed.

    In general, users should prefer setting the shutdownTimeoutFlag Flag value.

    Attributes
    protected
    Definition Classes
    HttpServerTrait
    Note

    the value is used to denote a delta "from now", that is this value is applied as: server.close(shutdownTimeoutDuration.fromNow())

    See also

    Time)

    https://github.com/twitter/util/blob/b0a5d06269b9526b4408239ce1441b2a213dd0df/util-core/src/main/scala/com/twitter/util/Duration.scala#L436

    com.twitter.finatra.http.HttpServerTrait.shutdownTimeoutFlag

  60. def disableAdminHttpServer: Boolean
    Attributes
    protected
    Definition Classes
    AdminHttpServer
  61. val dtabAddBaseFlag: Flag[Dtab]
    Definition Classes
    DtabFlags
  62. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  63. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  64. def error(marker: Marker, message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  65. def error(message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  66. def error(marker: Marker, message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  67. def error(message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  68. def errorResult[T](message: => String)(fn: => T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  69. def exitOnError(reason: String, details: => String): Unit
    Attributes
    protected
    Definition Classes
    App
  70. def exitOnError(reason: String): Unit
    Attributes
    protected
    Definition Classes
    App
  71. def exitOnError(throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    App
  72. def failfastOnFlagsNotParsed: Boolean

    <invalid inheritdoc annotation>

    <invalid inheritdoc annotation>

    Attributes
    protected
    Definition Classes
    App → App
    Note

    It is HIGHLY recommended that this value remains 'true'. This value SHOULD NOT be changed to 'false' without a very good reason.This method only remains overridable for legacy reasons.

  73. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  74. final def flag: Flags
    Definition Classes
    App
  75. def frameworkConfigureHttpServer(server: Server): Server
    Attributes
    protected[finatra]
    Definition Classes
    HttpServerTrait
  76. def frameworkConfigureHttpsServer(server: Server): Server
    Attributes
    protected[finatra]
    Definition Classes
    HttpServerTrait
  77. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  78. val group: String
    Definition Classes
    Lifecycle
  79. def handle(clazz: Class[_ <: Handler]): Unit

    Utility to run a com.twitter.inject.utils.Handler.

    Utility to run a com.twitter.inject.utils.Handler. This is generally used for running a warmup handler in TwitterServer.warmup.

    Attributes
    protected
    Definition Classes
    TwitterServer
    See also

    com.twitter.inject.utils.Handler

  80. def handle[T <: Handler]()(implicit arg0: Manifest[T]): Unit

    Utility to run a com.twitter.inject.utils.Handler.

    Utility to run a com.twitter.inject.utils.Handler. This is generally used for running a warmup handler in TwitterServer.warmup.

    T

    - type parameter with upper-bound of com.twitter.inject.utils.Handler

    Attributes
    protected
    Definition Classes
    TwitterServer
    See also

    com.twitter.inject.utils.Handler

  81. def handlers: List[() => Handler]
    Definition Classes
    Logging
  82. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  83. final def httpBoundAddress: Option[InetSocketAddress]

    The address to which the underlying Http ListeningServer is bound

    The address to which the underlying Http ListeningServer is bound

    Attributes
    protected
    Definition Classes
    HttpServerTrait
    Note

    this returns None before the postWarmup() lifecycle phase is done or if the server fails to start up.

  84. def httpExternalPort: Option[Int]

    Returns the bound port representing the external HTTP interface of this server.

    Returns the bound port representing the external HTTP interface of this server.

    returns

    a defined Some(Int) representing the port of the external HTTP interface if defined and bound, None otherwise.

    Definition Classes
    HttpServerTraitPorts
  85. def httpResponseClassifierModule: Module

    Default com.twitter.inject.TwitterModule for providing an HttpResponseClassifier.

    Default com.twitter.inject.TwitterModule for providing an HttpResponseClassifier.

    returns

    a com.twitter.inject.TwitterModule which provides an HttpResponseClassifier implementation.

    Attributes
    protected
    Definition Classes
    HttpServerTrait
  86. final def httpService: Service[Request, Response]

    Configuration of the Service[Request, Response] to serve on the ListeningServer is defined by configuring the HttpRouter and not by implementation of this method, thus this method overridden to be final and set to a NilService.

    Configuration of the Service[Request, Response] to serve on the ListeningServer is defined by configuring the HttpRouter and not by implementation of this method, thus this method overridden to be final and set to a NilService.

    Attributes
    protected
    Definition Classes
    HttpServerHttpServerTrait
  87. final def httpsBoundAddress: Option[InetSocketAddress]

    The address to which the underlying Https ListeningServer is bound

    The address to which the underlying Https ListeningServer is bound

    Attributes
    protected
    Definition Classes
    HttpServerTrait
    Note

    this returns None before the postWarmup() lifecycle phase is done or if the server fails to start up.

  88. def httpsExternalPort: Option[Int]

    Returns the bound port representing the external HTTPS interface of this server.

    Returns the bound port representing the external HTTPS interface of this server.

    returns

    a defined Some(Int) representing the port of the external HTTPS interface if defined and bound, None otherwise.

    Definition Classes
    HttpServerTraitPorts
  89. def includeGlobalFlags: Boolean
    Attributes
    protected
    Definition Classes
    App
  90. val inferClassNamesFlag: Flag[Boolean]
    Attributes
    protected[this]
    Definition Classes
    Logging
  91. def info(marker: Marker, message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  92. def info(message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  93. def info(marker: Marker, message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  94. def info(message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  95. def infoResult[T](message: => String)(fn: => T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  96. final def init(f: => Unit): Unit
    Attributes
    protected
    Definition Classes
    App
  97. def injector: Injector
    Definition Classes
    App
  98. final def isClosed: Boolean
    Definition Classes
    CloseOnce
  99. def isDebugEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  100. def isDebugEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  101. def isErrorEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  102. def isErrorEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  103. def isInfoEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  104. def isInfoEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  105. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  106. def isReady(implicit permit: CanAwait): Boolean
    Definition Classes
    CloseOnceAwaitably0 → Awaitable
  107. def isTraceEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  108. def isTraceEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  109. def isWarnEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  110. def isWarnEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  111. def jacksonModule: Module

    Default com.twitter.inject.TwitterModule for providing a com.twitter.util.jackson.ScalaObjectMapper.

  112. def javaModules: Collection[Module]

    Production modules from Java.

    Production modules from Java.

    Attributes
    protected
    Definition Classes
    App
  113. def javaOverrideModules: Collection[Module]

    ONLY INTENDED FOR USE IN TESTING.

    ONLY INTENDED FOR USE IN TESTING.

    Override modules from Java which redefine production bindings (only use overrideModules during testing) If you think you need this in your main server you are most likely doing something incorrectly.

    Attributes
    protected
    Definition Classes
    App
  114. val levelFlag: Flag[Level]
    Attributes
    protected[this]
    Definition Classes
    Logging
  115. def libraryName: String

    Name used for registration in the com.twitter.util.registry.Library

    Name used for registration in the com.twitter.util.registry.Library

    returns

    library name to register in the Library registry.

    Attributes
    protected
    Definition Classes
    TwitterServer → AdminHttpServer
  116. def linterRules: Seq[Rule]
    Definition Classes
    Linters
  117. def loadModules(): InstalledModules

    ONLY INTENDED FOR USE BY THE FRAMEWORK.

    ONLY INTENDED FOR USE BY THE FRAMEWORK.

    Attributes
    protected[inject]
    Definition Classes
    App
  118. def loadServiceBindings: Seq[Binding[_]]
    Attributes
    protected[this]
    Definition Classes
    App
  119. final def logger: Logger
    Attributes
    protected[this]
    Definition Classes
    Logging
  120. def loggerFactories: List[LoggerFactory]
    Definition Classes
    Logging
  121. final def loggerName: String
    Attributes
    protected[this]
    Definition Classes
    Logging
  122. final def main(): Unit

    DO NOT BLOCK

    DO NOT BLOCK

    Definition Classes
    TwitterServerApp
  123. final def main(args: Array[String]): Unit
    Definition Classes
    App
  124. def messageBodyModule: Module

    Default com.twitter.inject.TwitterModule for providing implementations, com.twitter.finatra.http.marshalling.DefaultMessageBodyReader, com.twitter.finatra.http.marshalling.DefaultMessageBodyWriter.

  125. def modules: Seq[Module]

    Production modules.

    Production modules.

    Attributes
    protected
    Definition Classes
    App
    Note

    Java users should prefer javaModules.

  126. def name: String
    Definition Classes
    App
  127. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  128. final def nonExitingMain(args: Array[String]): Unit
    Definition Classes
    App
  129. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  130. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  131. final def observe(event: Event)(f: => Unit): Unit
    Attributes
    protected
    Definition Classes
    Lifecycle
  132. final def observeFuture(event: Event)(f: Future[Unit]): Future[Unit]
    Attributes
    protected
    Definition Classes
    Lifecycle
  133. final def onExit(f: => Unit): Unit
    Attributes
    protected
    Definition Classes
    App
  134. final def onExitLast(f: => Unit): Unit
    Attributes
    protected
    Definition Classes
    App
  135. val outputFlag: Flag[String]
    Attributes
    protected[this]
    Definition Classes
    Logging
  136. def overrideModules: Seq[Module]

    ONLY INTENDED FOR USE IN TESTING.

    ONLY INTENDED FOR USE IN TESTING.

    Override modules which redefine production bindings (only use overrideModules during testing) If you think you need this in your main server you are most likely doing something incorrectly.

    Attributes
    protected
    Definition Classes
    App
  137. def parseArgs(args: Array[String]): Unit
    Attributes
    protected[this]
    Definition Classes
    App
  138. def postInjectorStartup(): Unit

    After creation of the Injector.

    After creation of the Injector. Before any other lifecycle methods.

    Attributes
    protected
    Definition Classes
    HttpServerTwitterServerApp
    Annotations
    @Lifecycle()
    Note

    You MUST call super.postInjectorStartup() in any overridden definition of this method. Failure to do so may cause your server to not completely startup.

    ,

    It is NOT expected that you block in this method as you will prevent completion of the server lifecycle.

  139. def postWarmup(): Unit

    If you override this method to create and bind any external interface or to instantiate any awaitable it is expected that you add the Awaitable (or com.twitter.finagle.ListeningServer) to the list of Awaitables using the await[T <: Awaitable[_(awaitable: T): Unit function.

    If you override this method to create and bind any external interface or to instantiate any awaitable it is expected that you add the Awaitable (or com.twitter.finagle.ListeningServer) to the list of Awaitables using the await[T <: Awaitable[_(awaitable: T): Unit function.

    Attributes
    protected
    Definition Classes
    HttpServerTraitTwitterServerApp
    Annotations
    @Lifecycle()
    Note

    You MUST call super.postWarmup() in any overridden definition of this method. Failure to do so may cause your server to not completely startup.

    ,

    It is NOT expected that you block in this method as you will prevent completion of the server lifecycle.

  140. final def postmain(f: => Unit): Unit
    Attributes
    protected
    Definition Classes
    App
  141. def prebindWarmup(): Unit
    Definition Classes
    Warmup
  142. final def premain(f: => Unit): Unit
    Attributes
    protected
    Definition Classes
    App
  143. def ready(timeout: Duration)(implicit permit: CanAwait): HttpServer.this.type
    Definition Classes
    CloseOnceAwaitably0 → Awaitable
  144. def resolveFinagleClientsOnStartup: Boolean

    Resolve all Finagle clients before warmup method called

    Resolve all Finagle clients before warmup method called

    Attributes
    protected
    Definition Classes
    TwitterServer
  145. def result(timeout: Duration)(implicit permit: CanAwait): Unit
    Definition Classes
    CloseOnceAwaitably0 → Awaitable
  146. val rollPolicyFlag: Flag[Policy]
    Attributes
    protected[this]
    Definition Classes
    Logging
  147. val rotateCountFlag: Flag[Int]
    Attributes
    protected[this]
    Definition Classes
    Logging
  148. def routes: Seq[Route]
    Definition Classes
    AdminHttpServer
  149. final def run(): Unit

    Attributes
    protected
    Definition Classes
    TwitterServerApp
    See also

    com.twitter.inject.server.TwitterServer#start

  150. final def runOnExit(runnable: Runnable): Unit
    Attributes
    protected
    Definition Classes
    App
  151. final def runOnExitLast(runnable: Runnable): Unit
    Attributes
    protected
    Definition Classes
    App
  152. def setup(): Unit

    Callback method which is executed specifically in the postInjectorStartup lifecycle phase of this server.

    Callback method which is executed specifically in the postInjectorStartup lifecycle phase of this server.

    This is AFTER the injector is created but BEFORE server warmup has been performed.

    This method is thus suitable for starting and awaiting on PubSub publishers or subscribers.

    The server is NOT signaled to be started until AFTER this method has executed thus it is imperative that this method is NOT BLOCKED as it will cause the server to not complete startup.

    This method can be used to start long-lived processes that run in separate threads from the main() thread. It is expected that you manage these threads manually, e.g., by using a com.twitter.util.FuturePool.

    If you override this method to instantiate any com.twitter.util.Awaitable it is expected that you add the com.twitter.util.Awaitable to the list of Awaitables using the await[T <: Awaitable[_]](awaitable: T): Unit function if you want the server to exit when the com.twitter.util.Awaitable exits.

    Any exceptions thrown in this method will result in the server exiting.

    Attributes
    protected
    Definition Classes
    TwitterServer
  153. lazy val shutdownTimer: Timer
    Attributes
    protected
    Definition Classes
    TwitterServer → App
  154. def start(): Unit

    Callback method which is executed after the injector is created and all lifecycle methods have fully completed but before awaiting on any Awaitables.

    Callback method which is executed after the injector is created and all lifecycle methods have fully completed but before awaiting on any Awaitables. It is NOT expected that you block in this method as you will prevent completion of the server lifecycle.

    The server is signaled as STARTED prior to the execution of this callback as all lifecycle methods have successfully completed and the admin and any external interfaces have started.

    This method can be used to start long-lived processes that run in separate threads from the main() thread. It is expected that you manage these threads manually, e.g., by using a com.twitter.util.FuturePool.

    Any exceptions thrown in this method will result in the server exiting.

    Attributes
    protected
    Definition Classes
    TwitterServer
  155. final def startupCompletionEvent: Event
    Attributes
    protected[twitter]
    Definition Classes
    TwitterServer → Warmup → TwitterServer
  156. def statsReceiver: StatsReceiver
    Definition Classes
    Stats
  157. def statsReceiverModule: Module

    Default com.twitter.inject.TwitterModule for providing a com.twitter.finagle.stats.StatsReceiver.

    returns

    a com.twitter.inject.TwitterModule which provides a com.twitter.finagle.stats.StatsReceiver implementation.

    Attributes
    protected
    Definition Classes
    TwitterServer
  158. def streamRequest: Boolean

    If false, the underlying Netty pipeline collects HttpChunks into the body of each Request Set to true if you wish to stream parse requests using request.reader.read

    If false, the underlying Netty pipeline collects HttpChunks into the body of each Request Set to true if you wish to stream parse requests using request.reader.read

    Attributes
    protected
    Definition Classes
    HttpServerTrait
  159. final val suppressGracefulShutdownErrors: Boolean
    Definition Classes
    TwitterServer → App
  160. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  161. def thriftPort: Option[Int]

    Returns the bound port representing the external Thrift interface of this server.

    Returns the bound port representing the external Thrift interface of this server.

    returns

    a defined Some(Int) representing the port of the external Thrift interface if defined and bound, None otherwise.

    Definition Classes
    Ports
  162. def toString(): String
    Definition Classes
    AnyRef → Any
  163. def trace(marker: Marker, message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  164. def trace(message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  165. def trace(marker: Marker, message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  166. def trace(message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  167. def traceResult[T](message: => String)(fn: => T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  168. def validatorModule: Module

    Default com.twitter.inject.TwitterModule for providing a com.twitter.util.validation.ScalaValidator.

    returns

    a com.twitter.inject.TwitterModule which provides a com.twitter.util.validation.ScalaValidator implementation.

    Attributes
    protected
    Note

    This can be overriden to provide a different Validator. The new Validator will replace the default Validator in jacksonModule, and be used to apply the validation logic in com.fasterxml.jackson.module.scala.ScalaObjectMapper and during HTTP request parsing.

  169. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  170. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  171. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  172. def warmup(): Unit

    Callback method run before TwitterServer.postWarmup, used for performing warm up of this server.

    Callback method run before TwitterServer.postWarmup, used for performing warm up of this server. Override, but do not call super.warmup() as you will trigger a lint rule violation.

    Any exceptions thrown in this method will result in the app exiting.

    Attributes
    protected
    Definition Classes
    TwitterServerApp
    See also

    HTTP Server Warmup

    Thrift Server Warmup

  173. def warmupComplete(): Unit
    Definition Classes
    Warmup
  174. def warn(marker: Marker, message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  175. def warn(message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  176. def warn(marker: Marker, message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  177. def warn(message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  178. def warnResult[T](message: => String)(fn: => T): T
    Attributes
    protected[this]
    Definition Classes
    Logging

Deprecated Value Members

  1. lazy val log: Logger
    Definition Classes
    DeprecatedLogging → Logging
    Annotations
    @deprecated
    Deprecated

    (Since version 2017-10-06) For backwards compatibility only.

Inherited from HttpServerTrait

Inherited from TwitterServer

Inherited from Warmup

Inherited from Ports

Inherited from DeprecatedLogging

Inherited from Logging

Inherited from TwitterServer

Inherited from Lifecycle

Inherited from AdminHttpServer

Inherited from Hooks

Inherited from DtabFlags

Inherited from Linters

Inherited from Stats

Inherited from App

Inherited from Logging

Inherited from Slf4jBridge

Inherited from App

Inherited from Lifecycle

Inherited from CloseOnceAwaitably

Inherited from CloseOnceAwaitably0[Unit]

Inherited from Awaitable[Unit]

Inherited from ClosableOnce

Inherited from CloseOnce

Inherited from Closable

Inherited from AnyRef

Inherited from Any

Ungrouped