Packages

c

com.twitter.inject.server

AbstractTwitterServer

abstract class AbstractTwitterServer extends TwitterServer

AbstractTwitterServer for usage from Java

Linear Supertypes
TwitterServer, Warmup, Ports, DeprecatedLogging, logging.Logging, server.TwitterServer, Stats, Lifecycle, Admin, AdminHttpServer, Hooks, Linters, Slf4jBridge, App, Logging, util.logging.Logging, App, CloseAwaitably, CloseAwaitably0[Unit], Awaitable[Unit], Closable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AbstractTwitterServer
  2. TwitterServer
  3. Warmup
  4. Ports
  5. DeprecatedLogging
  6. Logging
  7. TwitterServer
  8. Stats
  9. Lifecycle
  10. Admin
  11. AdminHttpServer
  12. Hooks
  13. Linters
  14. Slf4jBridge
  15. App
  16. Logging
  17. Logging
  18. App
  19. CloseAwaitably
  20. CloseAwaitably0
  21. Awaitable
  22. Closable
  23. AnyRef
  24. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AbstractTwitterServer()

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 addAdminRoute(route: Route): Unit
    Definition Classes
    AdminHttpServer
  6. def addAdminRoutes(newRoutes: Seq[Route]): Unit
    Definition Classes
    AdminHttpServer
  7. def addFrameworkModule(module: Module): Unit
    Attributes
    protected
    Definition Classes
    App
  8. def addFrameworkModules(modules: Module*): Unit
    Attributes
    protected
    Definition Classes
    App
  9. def addFrameworkOverrideModules(modules: Module*): Unit
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    App
  10. def adminBoundAddress: InetSocketAddress
    Definition Classes
    AdminHttpServer
  11. val adminHttpServer: ListeningServer
    Attributes
    protected
    Definition Classes
    AdminHttpServer
    Annotations
    @volatile()
  12. val adminPort: Flag[InetSocketAddress]
    Definition Classes
    AdminHttpServer
  13. 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
    TwitterServer → App
    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

  14. def allowUndefinedFlags: Boolean
    Attributes
    protected
    Definition Classes
    App
  15. val appendFlag: Flag[Boolean]
    Attributes
    protected[this]
    Definition Classes
    Logging
  16. def args: Array[String]
    Definition Classes
    App
  17. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  18. val asyncFlag: Flag[Boolean]
    Attributes
    protected[this]
    Definition Classes
    Logging
  19. val asyncMaxSizeFlag: Flag[Int]
    Attributes
    protected[this]
    Definition Classes
    Logging
  20. 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)

  21. 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

  22. 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
    TwitterServer → App
    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

  23. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  24. final def close(deadline: Time): Future[Unit]
    Definition Classes
    App → Closable
  25. def close(after: Duration): Future[Unit]
    Definition Classes
    Closable
  26. final def close(): Future[Unit]
    Definition Classes
    Closable
  27. def closeAwaitably(f: ⇒ Future[Unit]): Future[Unit]
    Attributes
    protected
    Definition Classes
    CloseAwaitably0
  28. final def closeOnExit(closable: Closable): Unit
    Definition Classes
    App
  29. final def closeOnExitLast(closable: Closable): Unit
    Definition Classes
    App
  30. def configureAdminHttpServer(server: Server): Server
    Attributes
    protected
    Definition Classes
    AdminHttpServer
  31. 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

  32. def debug(marker: Marker, message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  33. def debug(message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  34. def debug(marker: Marker, message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  35. def debug(message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  36. def debugFutureResult[T](msg: String)(func: ⇒ Future[T]): Future[T]
    Attributes
    protected
    Definition Classes
    Logging
  37. def debugResult[T](message: ⇒ String)(fn: ⇒ T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  38. def defaultAdminPort: Int
    Definition Classes
    AdminHttpServer
  39. def defaultAppend: Boolean
    Definition Classes
    Logging
  40. def defaultCloseGracePeriod: Duration
    Definition Classes
    App
  41. def defaultFormatter: Formatter
    Definition Classes
    Logging
  42. def defaultLogLevel: Level
    Definition Classes
    Logging
  43. def defaultOutput: String
    Definition Classes
    Logging
  44. def defaultRollPolicy: Policy
    Definition Classes
    Logging
  45. def defaultRotateCount: Int
    Definition Classes
    Logging
  46. def disableAdminHttpServer: Boolean

    If true, the Twitter-Server admin server will be disabled.

    If true, the Twitter-Server admin server will be disabled. Note: Disabling the admin server allows services to be deployed into environments where only a single port is allowed

    Attributes
    protected
    Definition Classes
    TwitterServer
  47. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  48. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  49. def error(marker: Marker, message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  50. def error(message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  51. def error(marker: Marker, message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  52. def error(message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  53. def errorResult[T](message: ⇒ String)(fn: ⇒ T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  54. def exitOnError(reason: String, details: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    App
  55. def exitOnError(reason: String): Unit
    Attributes
    protected
    Definition Classes
    App
  56. def exitOnError(throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    App
  57. def failfastOnFlagsNotParsed: Boolean
    Attributes
    protected
    Definition Classes
    TwitterServer → App
  58. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  59. val flag: Flags
    Definition Classes
    App
  60. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  61. val group: String
    Definition Classes
    Lifecycle
  62. 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

  63. 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

  64. def handlers: List[() ⇒ Handler]
    Definition Classes
    Logging
  65. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  66. def httpExternalPort: Option[Int]
    Definition Classes
    Ports
  67. def httpsExternalPort: Option[Int]
    Definition Classes
    Ports
  68. val inferClassNamesFlag: Flag[Boolean]
    Attributes
    protected[this]
    Definition Classes
    Logging
  69. def info(marker: Marker, message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  70. def info(message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  71. def info(marker: Marker, message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  72. def info(message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  73. def infoResult[T](message: ⇒ String)(fn: ⇒ T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  74. final def init(f: ⇒ Unit): Unit
    Attributes
    protected
    Definition Classes
    App
  75. def injector: Injector
    Definition Classes
    App
  76. def isDebugEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  77. def isDebugEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  78. def isErrorEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  79. def isErrorEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  80. def isInfoEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  81. def isInfoEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  82. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  83. def isReady(implicit permit: CanAwait): Boolean
    Definition Classes
    CloseAwaitably0 → Awaitable
  84. def isTraceEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  85. def isTraceEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  86. def isWarnEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  87. def isWarnEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  88. def javaModules: Collection[Module]
    Attributes
    protected
    Definition Classes
    App
  89. def javaOverrideModules: Collection[Module]
    Attributes
    protected
    Definition Classes
    App
  90. val levelFlag: Flag[Level]
    Attributes
    protected[this]
    Definition Classes
    Logging
  91. 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
  92. def linterRules: Seq[Rule]
    Definition Classes
    Linters
  93. def loadModules(): InstalledModules
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    App
  94. def loadServiceBindings: Seq[Binding[_]]
    Attributes
    protected[this]
    Definition Classes
    App
  95. final def logger: Logger
    Attributes
    protected[this]
    Definition Classes
    Logging
  96. def loggerFactories: List[LoggerFactory]
    Definition Classes
    Logging
  97. final def loggerName: String
    Attributes
    protected[this]
    Definition Classes
    Logging
  98. final def main(): Unit
    Definition Classes
    TwitterServer → App
  99. final def main(args: Array[String]): Unit
    Definition Classes
    App
  100. def modules: Seq[Module]
    Attributes
    protected
    Definition Classes
    App
  101. val name: String
    Definition Classes
    App
  102. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  103. final def nonExitingMain(args: Array[String]): Unit
    Definition Classes
    App
  104. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  105. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  106. final def onExit(f: ⇒ Unit): Unit
    Attributes
    protected
    Definition Classes
    App
  107. val outputFlag: Flag[String]
    Attributes
    protected[this]
    Definition Classes
    Logging
  108. def overrideModules: Seq[Module]
    Attributes
    protected
    Definition Classes
    App
  109. def parseArgs(args: Array[String]): Unit
    Attributes
    protected[this]
    Definition Classes
    App
  110. def postInjectorStartup(): Unit

    After creation of the Injector.

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

    Attributes
    protected
    Definition Classes
    TwitterServer → App
    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.

  111. 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 <: 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 <: Awaitable[_(awaitable: T): Unit]] function.

    Attributes
    protected
    Definition Classes
    TwitterServer → App
    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.

  112. final def postmain(f: ⇒ Unit): Unit
    Attributes
    protected
    Definition Classes
    App
  113. def prebindWarmup(): Unit
    Definition Classes
    Warmup
  114. final def premain(f: ⇒ Unit): Unit
    Attributes
    protected
    Definition Classes
    App
  115. def ready(timeout: Duration)(implicit permit: CanAwait): AbstractTwitterServer.this.type
    Definition Classes
    CloseAwaitably0 → Awaitable
  116. def resolveFinagleClientsOnStartup: Boolean

    Resolve all Finagle clients before warmup method called

    Resolve all Finagle clients before warmup method called

    Attributes
    protected
    Definition Classes
    TwitterServer
  117. def result(timeout: Duration)(implicit permit: CanAwait): Unit
    Definition Classes
    CloseAwaitably0 → Awaitable
  118. val rollPolicyFlag: Flag[Policy]
    Attributes
    protected[this]
    Definition Classes
    Logging
  119. val rotateCountFlag: Flag[Int]
    Attributes
    protected[this]
    Definition Classes
    Logging
  120. def routes: Seq[Route]
    Attributes
    protected
    Definition Classes
    Admin
  121. final def run(): Unit

    Attributes
    protected
    Definition Classes
    TwitterServer → App
    See also

    com.twitter.inject.server.TwitterServer#start

  122. 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 <: 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
  123. lazy val shutdownTimer: Timer
    Attributes
    protected
    Definition Classes
    TwitterServer → App
  124. 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
  125. def statsReceiver: StatsReceiver
    Definition Classes
    Stats
  126. def statsReceiverModule: Module

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

    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
  127. final val suppressGracefulShutdownErrors: Boolean
    Definition Classes
    TwitterServer → App
  128. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  129. def thriftPort: Option[Int]
    Definition Classes
    Ports
  130. def time[T](formatStr: String)(func: ⇒ T): T
    Attributes
    protected
    Definition Classes
    Logging
  131. def toString(): String
    Definition Classes
    AnyRef → Any
  132. def trace(marker: Marker, message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  133. def trace(message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  134. def trace(marker: Marker, message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  135. def trace(message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  136. def traceResult[T](message: ⇒ String)(fn: ⇒ T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  137. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  138. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  139. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  140. 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
    TwitterServer → App
    See also

    HTTP Server Warmup

    Thrift Server Warmup

  141. def warmupComplete(): Unit
    Definition Classes
    Warmup
  142. def warn(marker: Marker, message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  143. def warn(message: ⇒ Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  144. def warn(marker: Marker, message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  145. def warn(message: ⇒ Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  146. 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 TwitterServer

Inherited from Warmup

Inherited from Ports

Inherited from DeprecatedLogging

Inherited from logging.Logging

Inherited from server.TwitterServer

Inherited from Stats

Inherited from Lifecycle

Inherited from Admin

Inherited from AdminHttpServer

Inherited from Hooks

Inherited from Linters

Inherited from Slf4jBridge

Inherited from App

Inherited from Logging

Inherited from util.logging.Logging

Inherited from App

Inherited from CloseAwaitably

Inherited from CloseAwaitably0[Unit]

Inherited from Awaitable[Unit]

Inherited from Closable

Inherited from AnyRef

Inherited from Any

Ungrouped