Class

com.twitter.server

AbstractTwitterServer

Related Doc: package server

Permalink

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.

Linear Supertypes
TwitterServer, Stats, Lifecycle, Admin, AdminHttpServer, Hooks, Linters, Logging, Slf4jBridge, App, CloseAwaitably, CloseAwaitably0[Unit], Awaitable[Unit], Closable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AbstractTwitterServer
  2. TwitterServer
  3. Stats
  4. Lifecycle
  5. Admin
  6. AdminHttpServer
  7. Hooks
  8. Linters
  9. Logging
  10. Slf4jBridge
  11. App
  12. CloseAwaitably
  13. CloseAwaitably0
  14. Awaitable
  15. Closable
  16. AnyRef
  17. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AbstractTwitterServer()

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final val MinGrace: Duration

    Permalink
    Definition Classes
    App
  5. def addAdminRoute(route: Route): Unit

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

    Permalink
    Definition Classes
    AdminHttpServer
  7. def adminBoundAddress: InetSocketAddress

    Permalink

    The address to which the Admin HTTP server is bound.

    The address to which the Admin HTTP server is bound.

    Definition Classes
    AdminHttpServer
  8. var adminHttpServer: ListeningServer

    Permalink
    Attributes
    protected
    Definition Classes
    AdminHttpServer
  9. val adminPort: Flag[InetSocketAddress]

    Permalink
    Definition Classes
    AdminHttpServer
  10. def allowUndefinedFlags: Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    App
  11. def args: Array[String]

    Permalink
    Definition Classes
    App
  12. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  13. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. final def close(deadline: Time): Future[Unit]

    Permalink
    Definition Classes
    App → Closable
  15. def close(after: Duration): Future[Unit]

    Permalink
    Definition Classes
    Closable
  16. final def close(): Future[Unit]

    Permalink
    Definition Classes
    Closable
  17. def closeAwaitably(f: ⇒ Future[Unit]): Future[Unit]

    Permalink
    Attributes
    protected
    Definition Classes
    CloseAwaitably0
  18. final def closeOnExit(closable: Closable): Unit

    Permalink
    Definition Classes
    App
  19. final def closeOnExitLast(closable: Closable): Unit

    Permalink
    Definition Classes
    App
  20. def configureAdminHttpServer(server: Server): Server

    Permalink

    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
  21. def debug(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  22. def debug(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  23. def debug(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  24. def debug(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  25. def debugResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  26. def defaultAdminPort: Int

    Permalink
    Definition Classes
    AdminHttpServer
  27. def defaultCloseGracePeriod: Duration

    Permalink
    Definition Classes
    App
  28. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  29. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  30. def error(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  31. def error(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  32. def error(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  33. def error(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  34. def errorResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  35. def exitOnError(reason: String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    App
  36. def failfastOnFlagsNotParsed: Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    App
  37. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  38. val flag: Flags

    Permalink
    Definition Classes
    App
  39. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  40. val group: String

    Permalink
    Definition Classes
    Lifecycle
  41. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  42. def info(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  43. def info(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  44. def info(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  45. def info(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  46. def infoResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  47. final def init(f: ⇒ Unit): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    App
  48. def isDebugEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  49. def isDebugEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  50. def isErrorEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  51. def isErrorEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  52. def isInfoEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  53. def isInfoEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  54. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  55. def isReady(implicit permit: CanAwait): Boolean

    Permalink
    Definition Classes
    CloseAwaitably0 → Awaitable
  56. def isTraceEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  57. def isTraceEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  58. def isWarnEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  59. def isWarnEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  60. def libraryName: String

    Permalink

    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
  61. def linterRules: Seq[Rule]

    Permalink

    Exposed for testing

    Exposed for testing

    Definition Classes
    Linters
  62. def logger: Logger

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  63. def loggerName: String

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  64. def main(): Unit

    Permalink

    The main method of this server.

    The main method of this server.

    Annotations
    @throws( ... )
  65. final def main(args: Array[String]): Unit

    Permalink
    Definition Classes
    App
  66. val name: String

    Permalink
    Definition Classes
    App
  67. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  68. final def nonExitingMain(args: Array[String]): Unit

    Permalink
    Definition Classes
    App
  69. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  70. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  71. def onExit(): Unit

    Permalink

    Called prior to application exiting.

  72. final def onExit(f: ⇒ Unit): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    App
  73. def onInit(): Unit

    Permalink

    Called prior to application initialization.

  74. def postMain(): Unit

    Permalink

    Called after the main method.

  75. final def postmain(f: ⇒ Unit): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    App
  76. def preMain(): Unit

    Permalink

    Called before the main method.

  77. final def premain(f: ⇒ Unit): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    App
  78. def ready(timeout: Duration)(implicit permit: CanAwait): AbstractTwitterServer.this.type

    Permalink
    Definition Classes
    CloseAwaitably0 → Awaitable
  79. def result(timeout: Duration)(implicit permit: CanAwait): Unit

    Permalink
    Definition Classes
    CloseAwaitably0 → Awaitable
  80. def routes: Seq[Route]

    Permalink
    Attributes
    protected
    Definition Classes
    Admin
  81. lazy val shutdownTimer: Timer

    Permalink
    Attributes
    protected
    Definition Classes
    App
  82. def statsReceiver: StatsReceiver

    Permalink

    By default this returns the global LoadedStatsReceiver instance.

    By default this returns the global LoadedStatsReceiver instance. Take note when overriding this method to return the *same instance* on multiple calls otherwise you will get surprising stating behavior.

    returns

    a StatsReceiver instance.

    Definition Classes
    Stats
    See also

    com.twitter.finagle.stats.LoadedStatsReceiver

  83. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  84. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  85. def trace(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  86. def trace(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  87. def trace(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  88. def trace(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  89. def traceResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  90. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  91. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  92. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  93. def warn(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  94. def warn(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  95. def warn(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  96. def warn(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  97. def warnResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging

Inherited from TwitterServer

Inherited from Stats

Inherited from Lifecycle

Inherited from Admin

Inherited from AdminHttpServer

Inherited from Hooks

Inherited from Linters

Inherited from Logging

Inherited from Slf4jBridge

Inherited from App

Inherited from CloseAwaitably

Inherited from CloseAwaitably0[Unit]

Inherited from Awaitable[Unit]

Inherited from Closable

Inherited from AnyRef

Inherited from Any

Ungrouped