Packages

c

com.twitter.server

AbstractTwitterServer

abstract class AbstractTwitterServer extends TwitterServer

A Java-friendly version of the TwitterServer.

In addition to TwitterServer, this abstract class defines its own Java-friendly lifecycle methods onInit, preMain, postMain and onExit that might be overridden in a concrete class.

In order to launch the AbstractTwitterServer instance, the main method should be explicitly defined. It makes sense to define it within an inner class Main as shown below.

public class JavaServer extends AbstractTwitterServer {
  public static class Main {
    public static void main(String[] args) {
      new JavaServer().main(args);
    }
  }
}

The Main class containing the main method may be launched via java JavaServer$Main.

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AbstractTwitterServer
  2. TwitterServer
  3. Lifecycle
  4. AdminHttpServer
  5. Hooks
  6. DtabFlags
  7. Linters
  8. Stats
  9. Logging
  10. Slf4jBridge
  11. App
  12. Lifecycle
  13. CloseOnceAwaitably
  14. CloseOnceAwaitably0
  15. Awaitable
  16. ClosableOnce
  17. CloseOnce
  18. Closable
  19. AnyRef
  20. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

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

    Add a Route into admin http server.

    Add a Route into admin http server.

    Definition Classes
    AdminHttpServer
  6. def addAdminRoutes(newRoutes: Seq[Route]): Unit

    Add a collection of Routes into admin http server.

    Add a collection of Routes into admin http server.

    Definition Classes
    AdminHttpServer
  7. def addDtabs(): Unit
    Definition Classes
    DtabFlags
  8. def adminBoundAddress: InetSocketAddress

    The address to which the Admin HTTP server is bound.

    The address to which the Admin HTTP server is bound.

    Definition Classes
    AdminHttpServer
  9. val adminHttpServer: ListeningServer
    Attributes
    protected
    Definition Classes
    AdminHttpServer
    Annotations
    @volatile()
  10. val adminPort: Flag[InetSocketAddress]
    Definition Classes
    AdminHttpServer
  11. def allowUndefinedFlags: Boolean
    Attributes
    protected
    Definition Classes
    App
  12. def args: Array[String]
    Definition Classes
    App
  13. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  14. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  15. final def close(deadline: Time): Future[Unit]
    Definition Classes
    CloseOnce → Closable
  16. def close(after: Duration): Future[Unit]
    Definition Classes
    Closable
  17. final def close(): Future[Unit]
    Definition Classes
    Closable
  18. final def closeFuture: Future[Unit]
    Attributes
    protected
    Definition Classes
    CloseOnce
  19. final def closeOnExit(closable: Closable): Unit
    Definition Classes
    App
  20. final def closeOnExitLast(closable: Closable): Unit
    Definition Classes
    App
  21. def closeOnce(deadline: Time): Future[Unit]
    Attributes
    protected
    Definition Classes
    App → CloseOnce
  22. def configureAdminHttpServer(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 configureAdminHttpServer(server: Http.Server): Http.Server =
     server.withMonitor(myMonitor)
    server

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

    returns

    a configured Http.Server.

    Attributes
    protected
    Definition Classes
    AdminHttpServer
  23. def debug(marker: Marker, message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  24. def debug(message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  25. def debug(marker: Marker, message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  26. def debug(message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  27. def debugResult[T](message: => String)(fn: => T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  28. def defaultAdminPort: Int
    Definition Classes
    AdminHttpServer
  29. def defaultCloseGracePeriod: Duration
    Definition Classes
    App
  30. 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
    AdminHttpServer
  31. val dtabAddBaseFlag: Flag[Dtab]
    Definition Classes
    DtabFlags
  32. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  33. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  34. def error(marker: Marker, message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  35. def error(message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  36. def error(marker: Marker, message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  37. def error(message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  38. def errorResult[T](message: => String)(fn: => T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  39. def exitOnError(reason: String, details: => String): Unit
    Attributes
    protected
    Definition Classes
    App
  40. def exitOnError(reason: String): Unit
    Attributes
    protected
    Definition Classes
    App
  41. def exitOnError(throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    App
  42. def failfastOnFlagsNotParsed: Boolean
    Attributes
    protected
    Definition Classes
    App
  43. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  44. final def flag: Flags
    Definition Classes
    App
  45. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  46. val group: String
    Definition Classes
    Lifecycle
  47. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  48. def includeGlobalFlags: Boolean
    Attributes
    protected
    Definition Classes
    App
  49. def info(marker: Marker, message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  50. def info(message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  51. def info(marker: Marker, message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  52. def info(message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  53. def infoResult[T](message: => String)(fn: => T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  54. final def init(f: => Unit): Unit
    Attributes
    protected
    Definition Classes
    App
  55. final def isClosed: Boolean
    Definition Classes
    CloseOnce
  56. def isDebugEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  57. def isDebugEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  58. def isErrorEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  59. def isErrorEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  60. def isInfoEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  61. def isInfoEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  62. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  63. def isReady(implicit permit: CanAwait): Boolean
    Definition Classes
    CloseOnceAwaitably0 → Awaitable
  64. def isTraceEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  65. def isTraceEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  66. def isWarnEnabled(marker: Marker): Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  67. def isWarnEnabled: Boolean
    Attributes
    protected[this]
    Definition Classes
    Logging
  68. 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
    AdminHttpServer
  69. def linterRules: Seq[Rule]

    Exposed for testing

    Exposed for testing

    Definition Classes
    Linters
  70. def loadServiceBindings: Seq[Binding[_]]
    Attributes
    protected[this]
    Definition Classes
    App
  71. final def logger: Logger
    Attributes
    protected[this]
    Definition Classes
    Logging
  72. final def loggerName: String
    Attributes
    protected[this]
    Definition Classes
    Logging
  73. def main(): Unit

    The main method of this server.

    The main method of this server.

    Annotations
    @throws(scala.this.throws.<init>$default$1[Throwable])
  74. final def main(args: Array[String]): Unit
    Definition Classes
    App
  75. def name: String
    Definition Classes
    App
  76. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  77. final def nonExitingMain(args: Array[String]): Unit
    Definition Classes
    App
  78. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  79. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  80. final def observe(event: Event)(f: => Unit): Unit
    Attributes
    protected
    Definition Classes
    Lifecycle
  81. final def observeFuture(event: Event)(f: Future[Unit]): Future[Unit]
    Attributes
    protected
    Definition Classes
    Lifecycle
  82. def onExit(): Unit

    Called prior to application exiting.

  83. final def onExit(f: => Unit): Unit
    Attributes
    protected
    Definition Classes
    App
  84. def onExitLast(): Unit

    Called prior to application exiting after onExit.

  85. final def onExitLast(f: => Unit): Unit
    Attributes
    protected
    Definition Classes
    App
  86. def onInit(): Unit

    Called prior to application initialization.

  87. def parseArgs(args: Array[String]): Unit
    Attributes
    protected[this]
    Definition Classes
    App
  88. def postMain(): Unit

    Called after the main method.

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

    Called before the main method.

  91. final def premain(f: => Unit): Unit
    Attributes
    protected
    Definition Classes
    App
  92. def ready(timeout: Duration)(implicit permit: CanAwait): AbstractTwitterServer.this.type
    Definition Classes
    CloseOnceAwaitably0 → Awaitable
  93. def result(timeout: Duration)(implicit permit: CanAwait): Unit
    Definition Classes
    CloseOnceAwaitably0 → Awaitable
  94. def routes: Seq[Route]

    Get all Routes of admin http server.

    Get all Routes of admin http server.

    Definition Classes
    AdminHttpServer
  95. final def runOnExit(runnable: Runnable): Unit
    Attributes
    protected
    Definition Classes
    App
  96. final def runOnExitLast(runnable: Runnable): Unit
    Attributes
    protected
    Definition Classes
    App
  97. lazy val shutdownTimer: Timer

    Use the Finagle DefaultTimer

    Use the Finagle DefaultTimer

    Attributes
    protected
    Definition Classes
    TwitterServer → App
  98. def startAdminHttpServer(): Unit

    Starts the server.

    Starts the server.

    By default the server starts automatically. If this is not desirable (e.g. to postpone replies from the /health endpoint) the server can be disabled with disableAdminHttpServer. In the latter case the server can still be started manually with this method.

    Attributes
    protected
    Definition Classes
    AdminHttpServer
  99. def startupCompletionEvent: Event
    Attributes
    protected[twitter]
    Definition Classes
    TwitterServer
  100. def statsReceiver: StatsReceiver

    This returns the global LoadedStatsReceiver instance.

    This returns the global LoadedStatsReceiver instance.

    returns

    a StatsReceiver instance.

    Definition Classes
    Stats
    See also

    com.twitter.finagle.stats.LoadedStatsReceiver

  101. final val suppressGracefulShutdownErrors: Boolean

    Don't let applications opt-out

    Don't let applications opt-out

    Definition Classes
    TwitterServer → App
  102. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  103. def toString(): String
    Definition Classes
    AnyRef → Any
  104. def trace(marker: Marker, message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  105. def trace(message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  106. def trace(marker: Marker, message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  107. def trace(message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  108. def traceResult[T](message: => String)(fn: => T): T
    Attributes
    protected[this]
    Definition Classes
    Logging
  109. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  110. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  111. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  112. def warn(marker: Marker, message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  113. def warn(message: => Any, cause: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  114. def warn(marker: Marker, message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  115. def warn(message: => Any): Unit
    Attributes
    protected[this]
    Definition Classes
    Logging
  116. def warnResult[T](message: => String)(fn: => T): T
    Attributes
    protected[this]
    Definition Classes
    Logging

Inherited from TwitterServer

Inherited from Lifecycle

Inherited from AdminHttpServer

Inherited from Hooks

Inherited from DtabFlags

Inherited from Linters

Inherited from Stats

Inherited from Logging

Inherited from Slf4jBridge

Inherited from App

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