Packages

trait App extends app.App with Slf4jBridge with util.logging.Logging

A com.twitter.app.App that supports injection and com.twitter.inject.TwitterModule modules.

It is not expected that you override @Lifecycle methods. If you do, take care to ensure that you call the super implementation, otherwise critical lifecycle set-up may not occur causing your application to either function improperly or outright fail.

Typically, you will only need to interact with the following methods: run -- callback executed after the injector is created and all @Lifecycle methods have completed.

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. App
  2. Logging
  3. Slf4jBridge
  4. App
  5. Lifecycle
  6. CloseOnceAwaitably
  7. CloseOnceAwaitably0
  8. Awaitable
  9. ClosableOnce
  10. CloseOnce
  11. Closable
  12. AnyRef
  13. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

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 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]
  6. def addFrameworkModules(modules: Module*): Unit

    ONLY INTENDED FOR USE BY THE FRAMEWORK.

    ONLY INTENDED FOR USE BY THE FRAMEWORK.

    Attributes
    protected[twitter]
  7. def addFrameworkOverrideModules(modules: Module*): Unit

    ONLY INTENDED FOR USE BY THE FRAMEWORK.

    ONLY INTENDED FOR USE BY THE FRAMEWORK.

    Attributes
    protected[inject]
  8. def afterPostWarmup(): Unit

    Method to be be called after port warmup

    Method to be be called after port warmup

    Attributes
    protected
    Annotations
    @Lifecycle()
  9. def allowUndefinedFlags: Boolean
    Attributes
    protected
    Definition Classes
    App
  10. def args: Array[String]
    Definition Classes
    App
  11. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  12. def beforePostWarmup(): Unit

    Method to be called after successful warmup but before application initialization

    Method to be called after successful warmup but before application initialization

    Attributes
    protected
    Annotations
    @Lifecycle()
  13. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  14. final def close(deadline: Time): Future[Unit]
    Definition Classes
    CloseOnce → Closable
  15. def close(after: Duration): Future[Unit]
    Definition Classes
    Closable
  16. final def close(): Future[Unit]
    Definition Classes
    Closable
  17. final def closeFuture: Future[Unit]
    Attributes
    protected
    Definition Classes
    CloseOnce
  18. final def closeOnExit(closable: Closable): Unit
    Definition Classes
    App
  19. final def closeOnExitLast(closable: Closable): Unit
    Definition Classes
    App
  20. def closeOnce(deadline: Time): Future[Unit]
    Attributes
    protected
    Definition Classes
    App → CloseOnce
  21. def debug(marker: Marker, message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  22. def debug(message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  23. def debug(marker: Marker, message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  24. def debug(message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  25. def debugResult[T](message: => String)(fn: => T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  26. def defaultCloseGracePeriod: Duration
    Definition Classes
    App
  27. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  29. def error(marker: Marker, message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  30. def error(message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  31. def error(marker: Marker, message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  32. def error(message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  33. def errorResult[T](message: => String)(fn: => T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  34. def exitOnError(reason: String, details: => String): Unit
    Attributes
    protected
    Definition Classes
    App
  35. def exitOnError(reason: String): Unit
    Attributes
    protected
    Definition Classes
    App
  36. def exitOnError(throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    App
  37. 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.

  38. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  39. final def flag: app.Flags
    Definition Classes
    App
  40. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  41. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  42. def includeGlobalFlags: Boolean
    Attributes
    protected
    Definition Classes
    App
  43. def info(marker: Marker, message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  44. def info(message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  45. def info(marker: Marker, message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  46. def info(message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  47. def infoResult[T](message: => String)(fn: => T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  48. final def init(f: => Unit): Unit
    Attributes
    protected
    Definition Classes
    App
  49. def injector: Injector
  50. final def isClosed: Boolean
    Definition Classes
    CloseOnce
  51. def isDebugEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  52. def isDebugEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  53. def isErrorEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  54. def isErrorEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  55. def isInfoEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  56. def isInfoEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  57. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  58. def isReady(implicit permit: CanAwait): Boolean
    Definition Classes
    CloseOnceAwaitably0 → Awaitable
  59. def isTraceEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  60. def isTraceEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  61. def isWarnEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  62. def isWarnEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  63. def javaModules: Collection[Module]

    Production modules from Java.

    Production modules from Java.

    Attributes
    protected
  64. 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
  65. def loadModules(): InstalledModules

    ONLY INTENDED FOR USE BY THE FRAMEWORK.

    ONLY INTENDED FOR USE BY THE FRAMEWORK.

    Attributes
    protected[inject]
  66. def loadServiceBindings: Seq[Binding[_]]
    Attributes
    protected[this]
    Definition Classes
    App
  67. final def logger: Logger
    Attributes
    protected[this]
    Definition Classes
    Logging
  68. final def loggerName: String
    Attributes
    protected[this]
    Definition Classes
    Logging
  69. def main(): Unit

    DO NOT BLOCK

  70. final def main(args: Array[String]): Unit
    Definition Classes
    App
  71. def modules: Seq[Module]

    Production modules.

    Production modules.

    Attributes
    protected
    Note

    Java users should prefer javaModules.

  72. def name: String
    Definition Classes
    App
  73. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  74. final def nonExitingMain(args: Array[String]): Unit
    Definition Classes
    App
  75. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  76. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  77. final def observe(event: Event)(f: => Unit): Unit
    Attributes
    protected
    Definition Classes
    Lifecycle
  78. final def observeFuture(event: Event)(f: Future[Unit]): Future[Unit]
    Attributes
    protected
    Definition Classes
    Lifecycle
  79. final def onExit(f: => Unit): Unit
    Attributes
    protected
    Definition Classes
    App
  80. final def onExitLast(f: => Unit): Unit
    Attributes
    protected
    Definition Classes
    App
  81. 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
  82. def parseArgs(args: Array[String]): Unit
    Attributes
    protected[this]
    Definition Classes
    App
  83. def postInjectorStartup(): Unit

    Method to be called after injector creation

    Method to be called after injector creation

    Attributes
    protected
    Annotations
    @Lifecycle()
  84. def postWarmup(): Unit

    Method to be called after successful warmup

    Method to be called after successful warmup

    Attributes
    protected
    Annotations
    @Lifecycle()
  85. final def postmain(f: => Unit): Unit
    Attributes
    protected
    Definition Classes
    App
  86. final def premain(f: => Unit): Unit
    Attributes
    protected
    Definition Classes
    App
  87. def ready(timeout: Duration)(implicit permit: CanAwait): App.this.type
    Definition Classes
    CloseOnceAwaitably0 → Awaitable
  88. def result(timeout: Duration)(implicit permit: CanAwait): Unit
    Definition Classes
    CloseOnceAwaitably0 → Awaitable
  89. def run(): Unit

    Callback method executed after the injector is created and all lifecycle methods have fully completed.

    Callback method executed after the injector is created and all lifecycle methods have fully completed.

    The app is signaled as STARTED prior to the execution of this callback as all lifecycle methods have successfully completed.

    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 app exiting.

    Attributes
    protected
  90. final def runOnExit(runnable: Runnable): Unit
    Attributes
    protected
    Definition Classes
    App
  91. final def runOnExitLast(runnable: Runnable): Unit
    Attributes
    protected
    Definition Classes
    App
  92. lazy val shutdownTimer: Timer
    Attributes
    protected
    Definition Classes
    App
  93. def suppressGracefulShutdownErrors: Boolean
    Attributes
    protected
    Definition Classes
    App
  94. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  95. def toString(): String
    Definition Classes
    AnyRef → Any
  96. def trace(marker: Marker, message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  97. def trace(message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  98. def trace(marker: Marker, message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  99. def trace(message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  100. def traceResult[T](message: => String)(fn: => T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  101. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  102. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  103. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  104. def warmup(): Unit

    Callback method run before postWarmup

    Callback method run before postWarmup

    Attributes
    protected
  105. def warn(marker: Marker, message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  106. def warn(message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  107. def warn(marker: Marker, message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  108. def warn(message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  109. def warnResult[T](message: => String)(fn: => T): T
    Attributes
    protected[this]
    Definition Classes
    Logging

Inherited from util.logging.Logging

Inherited from Slf4jBridge

Inherited from app.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