Packages

c

com.twitter.finatra.thrift

AbstractThriftServer

abstract class AbstractThriftServer extends AbstractTwitterServer with ThriftServer

A Finagle server which exposes an external Thrift interface implemented by a Service[Array[Byte], Array[Byte]] configured via a JavaThriftRouter. This abstract class is intended for use from Java or with generated Java code.

Note

Scala users are encouraged to use ThriftServer instead.

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

Instance Constructors

  1. new AbstractThriftServer()

Abstract Value Members

  1. abstract def configureThrift(router: JavaThriftRouter): Unit

    Users MUST provide an implementation to configure the provided JavaThriftRouter.

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

    router

    the JavaThriftRouter 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 addAdminRoute(route: Route): Unit
    Definition Classes
    AdminHttpServer
  6. def addAdminRoutes(newRoutes: Seq[Route]): Unit
    Definition Classes
    AdminHttpServer
  7. def addDtabs(): Unit
    Definition Classes
    DtabFlags
  8. 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
  9. 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
  10. 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
  11. def adminBoundAddress: InetSocketAddress
    Definition Classes
    AdminHttpServer
  12. val adminHttpServer: ListeningServer
    Attributes
    protected
    Definition Classes
    AdminHttpServer
    Annotations
    @volatile()
  13. val adminPort: Flag[InetSocketAddress]
    Definition Classes
    AdminHttpServer
  14. 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

  15. def allowUndefinedFlags: Boolean
    Attributes
    protected
    Definition Classes
    App
  16. def args: Array[String]
    Definition Classes
    App
  17. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  18. 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)

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

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

  21. final def boundAddress: Option[InetSocketAddress]

    The address to which the underlying ListeningServer is bound

    The address to which the underlying ListeningServer is bound

    Attributes
    protected
    Definition Classes
    ThriftServerTrait
    Note

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

  22. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  23. final def close(deadline: Time): Future[Unit]
    Definition Classes
    CloseOnce → Closable
  24. def close(after: Duration): Future[Unit]
    Definition Classes
    Closable
  25. final def close(): Future[Unit]
    Definition Classes
    Closable
  26. final def closeFuture: Future[Unit]
    Attributes
    protected
    Definition Classes
    CloseOnce
  27. final def closeOnExit(closable: Closable): Unit
    Definition Classes
    App
  28. final def closeOnExitLast(closable: Closable): Unit
    Definition Classes
    App
  29. def closeOnce(deadline: Time): Future[Unit]
    Attributes
    protected
    Definition Classes
    App → CloseOnce
  30. def configureAdminHttpServer(server: Server): Server
    Attributes
    protected
    Definition Classes
    AdminHttpServer
  31. def configureService(service: Service[Array[Byte], Array[Byte]]): Service[Array[Byte], Array[Byte]]

    Override to provide further configuration to the Service[Array[Byte], Array[Byte]] served.

    Override to provide further configuration to the Service[Array[Byte], Array[Byte]] served. For example, to add "global" filters over the resultant Service[Array[Byte], Array[Byte]].

    E.g.

    override protected def configureService(
      service: Service[Array[Byte], Array[Byte]]
    ): Service[Array[Byte], Array[Byte]] = {
       injector.instance[MyGreatServiceFilter].andThen(service)
    }
    Attributes
    protected
  32. final def configureThrift(router: ThriftRouter): Unit

    Users are expected to use JavaThriftRouter)

    Users are expected to use JavaThriftRouter)

    router

    the ThriftRouter to configure.

    Attributes
    protected
    Definition Classes
    AbstractThriftServerThriftServer
  33. def configureThriftServer(server: Server): Server

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

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

    override def configureThriftServer(server: ThriftMux.Server): ThriftMux.Server = { server .withMaxReusableBufferSize(...) }

    server

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

    returns

    a configured ThriftMux.Server.

    Attributes
    protected
    Definition Classes
    ThriftServerTrait
  34. final def createFlag[T](name: String, default: T, help: String, flaggable: Flaggable[T]): Flag[T]

    A Java-friendly method for creating a named Flag.

    A Java-friendly method for creating a named Flag.

    name

    the name of the Flag.

    default

    a default value for the Flag when no value is given as an application argument.

    help

    the help text explaining the purpose of the Flag.

    returns

    the created Flag.

    Definition Classes
    AbstractApp
  35. final def createMandatoryFlag[T](name: String, help: String, usage: String, flaggable: Flaggable[T]): Flag[T]

    A Java-friendly way to create a "mandatory" Flag.

    A Java-friendly way to create a "mandatory" Flag. "Mandatory" flags MUST have a value provided as an application argument (as they have no default value to be used).

    name

    the name of the Flag.

    help

    the help text explaining the purpose of the Flag.

    usage

    a string describing the type of the Flag, i.e.: Integer.

    returns

    the created Flag.

    Definition Classes
    AbstractApp
  36. def debug(marker: Marker, message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  37. def debug(message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  38. def debug(marker: Marker, message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  39. def debug(message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  40. def debugResult[T](message: => String)(fn: => T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  41. def defaultAdminPort: Int
    Definition Classes
    AdminHttpServer
  42. def defaultCloseGracePeriod: Duration
    Definition Classes
    App
  43. def defaultThriftAnnouncement: String

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

    Default server announcement String used as the Flag default value for thriftAnnounceFlag. 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 thriftAnnounceFlag Flag value.

    Attributes
    protected
    Definition Classes
    ThriftServerTrait
    See also

    String)

  44. def defaultThriftPort: String

    Default external Thrift port used as the Flag default value for thriftPortFlag.

    Default external Thrift port used as the Flag default value for thriftPortFlag. 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 thriftPortFlag Flag value.

    Attributes
    protected
    Definition Classes
    ThriftServerTrait
    See also

    com.twitter.finatra.thrift.ThriftServerTrait.thriftPortFlag

  45. def defaultThriftServerName: String

    Default server name for the external Thrift interface used as the Flag default value for thriftServerNameFlag.

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

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

    Attributes
    protected
    Definition Classes
    ThriftServerTrait
    See also

    com.twitter.finatra.thrift.ThriftServerTrait.thriftServerNameFlag

  46. def defaultThriftShutdownTimeout: Duration

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

    Default shutdown timeout used as the Flag default value for thriftShutdownTimeoutFlag. 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 thriftShutdownTimeoutFlag Flag value.

    Attributes
    protected
    Definition Classes
    ThriftServerTrait
    Note

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

    See also

    com.twitter.finatra.thrift.ThriftServerTrait.thriftShutdownTimeoutFlag

    Time)

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

  47. def disableAdminHttpServer: Boolean
    Attributes
    protected
    Definition Classes
    AdminHttpServer
  48. val dtabAddBaseFlag: Flag[Dtab]
    Definition Classes
    DtabFlags
  49. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  50. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  51. def error(marker: Marker, message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  52. def error(message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  53. def error(marker: Marker, message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  54. def error(message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  55. def errorResult[T](message: => String)(fn: => T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  56. def exitOnError(reason: String, details: => String): Unit
    Attributes
    protected
    Definition Classes
    App
  57. def exitOnError(reason: String): Unit
    Attributes
    protected
    Definition Classes
    App
  58. def exitOnError(throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    App
  59. 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.

  60. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  61. final def flag: Flags
    Definition Classes
    App
  62. def frameworkConfigureServer(server: Server): Server
    Attributes
    protected[finatra]
    Definition Classes
    ThriftServerTrait
  63. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  64. val group: String
    Definition Classes
    Lifecycle
  65. 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

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

  67. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  68. 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
    Ports
  69. 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
    Ports
  70. def includeGlobalFlags: Boolean
    Attributes
    protected
    Definition Classes
    App
  71. def info(marker: Marker, message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  72. def info(message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  73. def info(marker: Marker, message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  74. def info(message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  75. def infoResult[T](message: => String)(fn: => T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  76. final def init(f: => Unit): Unit
    Attributes
    protected
    Definition Classes
    App
  77. def injector: Injector
    Definition Classes
    App
  78. final def isClosed: Boolean
    Definition Classes
    CloseOnce
  79. def isDebugEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  80. def isDebugEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  81. def isErrorEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  82. def isErrorEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  83. def isInfoEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  84. def isInfoEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  85. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  86. def isReady(implicit permit: CanAwait): Boolean
    Definition Classes
    CloseOnceAwaitably0 → Awaitable
  87. def isTraceEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  88. def isTraceEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  89. def isWarnEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  90. def isWarnEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  91. def javaModules: Collection[Module]

    Production modules from Java.

    Production modules from Java.

    Attributes
    protected
    Definition Classes
    App
  92. 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
  93. 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
  94. def linterRules: Seq[Rule]
    Definition Classes
    Linters
  95. def loadModules(): InstalledModules

    ONLY INTENDED FOR USE BY THE FRAMEWORK.

    ONLY INTENDED FOR USE BY THE FRAMEWORK.

    Attributes
    protected[inject]
    Definition Classes
    App
  96. def loadServiceBindings: Seq[Binding[_]]
    Attributes
    protected[this]
    Definition Classes
    App
  97. final def logger: Logger
    Attributes
    protected[this]
    Definition Classes
    Logging
  98. final def loggerName: String
    Attributes
    protected[this]
    Definition Classes
    Logging
  99. final def main(): Unit

    DO NOT BLOCK

    DO NOT BLOCK

    Definition Classes
    TwitterServerApp
  100. final def main(args: Array[String]): Unit
    Definition Classes
    App
  101. def modules: Seq[Module]

    Production modules.

    Production modules.

    Attributes
    protected
    Definition Classes
    App
    Note

    Java users should prefer javaModules.

  102. def name: String
    Definition Classes
    App
  103. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  104. final def nonExitingMain(args: Array[String]): Unit
    Definition Classes
    App
  105. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  106. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  107. final def observe(event: Event)(f: => Unit): Unit
    Attributes
    protected
    Definition Classes
    Lifecycle
  108. final def observeFuture(event: Event)(f: Future[Unit]): Future[Unit]
    Attributes
    protected
    Definition Classes
    Lifecycle
  109. def onExit(): Unit

    Called prior to application exiting.

    Called prior to application exiting.

    Definition Classes
    AbstractApp
  110. final def onExit(f: => Unit): Unit
    Attributes
    protected
    Definition Classes
    App
  111. def onExitLast(): Unit

    Called prior to application exiting after onExit.

    Called prior to application exiting after onExit.

    Definition Classes
    AbstractApp
  112. final def onExitLast(f: => Unit): Unit
    Attributes
    protected
    Definition Classes
    App
  113. def onInit(): Unit

    Called prior to application initialization.

    Called prior to application initialization.

    Definition Classes
    AbstractApp
  114. 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
  115. def parseArgs(args: Array[String]): Unit
    Attributes
    protected[this]
    Definition Classes
    App
  116. def postInjectorStartup(): Unit

    After creation of the Injector.

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

    Attributes
    protected
    Definition Classes
    ThriftServerTwitterServerApp
    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.

  117. def postMain(): Unit

    Called after the main method.

    Called after the main method.

    Definition Classes
    AbstractApp
  118. 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
    ThriftServerTraitTwitterServerApp
    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.

  119. final def postmain(f: => Unit): Unit
    Attributes
    protected
    Definition Classes
    App
  120. def preMain(): Unit

    Called before the main method.

    Called before the main method.

    Definition Classes
    AbstractApp
  121. def prebindWarmup(): Unit
    Definition Classes
    Warmup
  122. final def premain(f: => Unit): Unit
    Attributes
    protected
    Definition Classes
    App
  123. def ready(timeout: Duration)(implicit permit: CanAwait): AbstractThriftServer.this.type
    Definition Classes
    CloseOnceAwaitably0 → Awaitable
  124. def resolveFinagleClientsOnStartup: Boolean

    Resolve all Finagle clients before warmup method called

    Resolve all Finagle clients before warmup method called

    Attributes
    protected
    Definition Classes
    TwitterServer
  125. def result(timeout: Duration)(implicit permit: CanAwait): Unit
    Definition Classes
    CloseOnceAwaitably0 → Awaitable
  126. def routes: Seq[Route]
    Definition Classes
    AdminHttpServer
  127. final def run(): Unit

    Attributes
    protected
    Definition Classes
    TwitterServerApp
    See also

    com.twitter.inject.server.TwitterServer#start

  128. final def runOnExit(runnable: Runnable): Unit
    Attributes
    protected
    Definition Classes
    App
  129. final def runOnExitLast(runnable: Runnable): Unit
    Attributes
    protected
    Definition Classes
    App
  130. 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
  131. lazy val shutdownTimer: Timer
    Attributes
    protected
    Definition Classes
    TwitterServer → App
  132. 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
  133. def startAdminHttpServer(): Unit
    Attributes
    protected
    Definition Classes
    AdminHttpServer
  134. final def startupCompletionEvent: Event
    Attributes
    protected[twitter]
    Definition Classes
    TwitterServer → Warmup → TwitterServer
  135. def statsReceiver: StatsReceiver
    Definition Classes
    Stats
  136. 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
  137. final val suppressGracefulShutdownErrors: Boolean
    Definition Classes
    TwitterServer → App
  138. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  139. 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
    ThriftServerTraitPorts
  140. def thriftResponseClassifierModule: Module

    Default com.twitter.inject.TwitterModule for providing a ThriftResponseClassifier.

    Default com.twitter.inject.TwitterModule for providing a ThriftResponseClassifier.

    returns

    a com.twitter.inject.TwitterModule which provides a ThriftResponseClassifier implementation.

    Attributes
    protected
    Definition Classes
    ThriftServerTrait
  141. final def thriftService: Service[Array[Byte], Array[Byte]]

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

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

    Attributes
    protected
    Definition Classes
    ThriftServerThriftServerTrait
  142. def toString(): String
    Definition Classes
    AnyRef → Any
  143. def trace(marker: Marker, message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  144. def trace(message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  145. def trace(marker: Marker, message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  146. def trace(message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  147. def traceResult[T](message: => String)(fn: => T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  148. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  149. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  150. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  151. 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

  152. def warmupComplete(): Unit
    Definition Classes
    Warmup
  153. def warn(marker: Marker, message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  154. def warn(message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  155. def warn(marker: Marker, message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  156. def warn(message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  157. def warnResult[T](message: => String)(fn: => T): T
    Attributes
    protected[this]
    Definition Classes
    Logging

Inherited from ThriftServer

Inherited from ThriftServerTrait

Inherited from AbstractTwitterServer

Inherited from TwitterServer

Inherited from Warmup

Inherited from Ports

Inherited from TwitterServer

Inherited from Lifecycle

Inherited from AdminHttpServer

Inherited from Hooks

Inherited from DtabFlags

Inherited from Linters

Inherited from Stats

Inherited from AbstractApp

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