abstract class AbstractHttpServerTrait extends AbstractTwitterServer with HttpServerTrait
A basic HttpServer implemented by a
com.twitter.finagle.Service<Request, Response>
.
com.twitter.finagle.Service<Request, Response> }}}
- Note
Scala users are encouraged to use HttpServerTrait instead.
- Alphabetic
- By Inheritance
- AbstractHttpServerTrait
- HttpServerTrait
- AbstractTwitterServer
- TwitterServer
- Warmup
- Ports
- TwitterServer
- Lifecycle
- AdminHttpServer
- Hooks
- DtabFlags
- Linters
- Stats
- AbstractApp
- App
- Logging
- Slf4jBridge
- App
- Lifecycle
- CloseOnceAwaitably
- CloseOnceAwaitably0
- Awaitable
- ClosableOnce
- CloseOnce
- Closable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new AbstractHttpServerTrait()
Abstract Value Members
- abstract def httpService: Service[Request, Response]
The Finagle
Service[Request, Response]to serve on either configured ListeningServer.The Finagle
Service[Request, Response]to serve on either configured ListeningServer.Users must override with an implementation to serve a
Service[Request, Response]- Attributes
- protected
- Definition Classes
- HttpServerTrait
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final val MinGrace: Duration
- Definition Classes
- App
- def addAdminRoute(route: Route): Unit
- Definition Classes
- AdminHttpServer
- def addAdminRoutes(newRoutes: Seq[Route]): Unit
- Definition Classes
- AdminHttpServer
- def addDtabs(): Unit
- Definition Classes
- DtabFlags
- def addFrameworkModule(module: Module): Unit
- Attributes
- protected[twitter]
- Definition Classes
- App
- def addFrameworkModules(modules: Module*): Unit
- Attributes
- protected[twitter]
- Definition Classes
- App
- def addFrameworkOverrideModules(modules: Module*): Unit
- Attributes
- protected[inject]
- Definition Classes
- App
- def adminBoundAddress: InetSocketAddress
- Definition Classes
- AdminHttpServer
- val adminHttpServer: ListeningServer
- Attributes
- protected
- Definition Classes
- AdminHttpServer
- Annotations
- @volatile()
- val adminPort: Flag[InetSocketAddress]
- Definition Classes
- AdminHttpServer
- def afterPostWarmup(): Unit
- Attributes
- protected
- Definition Classes
- TwitterServer → App
- Annotations
- @Lifecycle()
- def allowUndefinedFlags: Boolean
- Attributes
- protected
- Definition Classes
- App
- def args: Array[String]
- Definition Classes
- App
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def await(awaitables: Awaitable[_]*): Unit
- Attributes
- protected
- Definition Classes
- TwitterServer
- def await[T <: Awaitable[_]](awaitable: T): Unit
- Attributes
- protected
- Definition Classes
- TwitterServer
- def beforePostWarmup(): Unit
- Attributes
- protected
- Definition Classes
- TwitterServer → App
- Annotations
- @Lifecycle()
- def buildHttpListeningServer(addr: InetSocketAddress, server: Server): ListeningServer
Construct a com.twitter.finagle.ListeningServer from the given InetSocketAddress addr and configured Http.Server stack.
Construct a com.twitter.finagle.ListeningServer from the given InetSocketAddress addr and configured Http.Server stack.
- addr
the InetSocketAddress address to bind the resultant ListeningServer.
- server
the configured Http.Server stack.
- returns
a constructed HTTP ListeningServer.
- Attributes
- protected
- Definition Classes
- HttpServerTrait
- def buildHttpsListeningServer(addr: InetSocketAddress, server: Server): ListeningServer
Construct a com.twitter.finagle.ListeningServer from the given InetSocketAddress addr and configured Http.Server stack.
Construct a com.twitter.finagle.ListeningServer from the given InetSocketAddress addr and configured Http.Server stack.
- addr
the InetSocketAddress address to bind the resultant ListeningServer.
- server
the configured Http.Server stack.
- returns
a constructed HTTPS ListeningServer.
- Attributes
- protected
- Definition Classes
- HttpServerTrait
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def close(deadline: Time): Future[Unit]
- Definition Classes
- CloseOnce → Closable
- def close(after: Duration): Future[Unit]
- Definition Classes
- Closable
- final def close(): Future[Unit]
- Definition Classes
- Closable
- final def closeFuture: Future[Unit]
- Attributes
- protected
- Definition Classes
- CloseOnce
- final def closeOnExit(closable: Closable): Unit
- Definition Classes
- App
- final def closeOnExitLast(closable: Closable): Unit
- Definition Classes
- App
- def closeOnce(deadline: Time): Future[Unit]
- Attributes
- protected
- Definition Classes
- App → CloseOnce
- def configureAdminHttpServer(server: Server): Server
- Attributes
- protected
- Definition Classes
- AdminHttpServer
- def configureHttpServer(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 configureHttpServer(server: Http.Server): Http.Server = { server .withMaxInitialLineSize(2048) }
- server
- the com.twitter.finagle.Http.Server to configure.
- returns
a configured Http.Server.
- Attributes
- protected
- Definition Classes
- HttpServerTrait
- def configureHttpsServer(server: Server): Server
This method allows for further configuration of the https server for parameters not exposed by this trait or for overriding defaults provided herein, e.g.,
This method allows for further configuration of the https server for parameters not exposed by this trait or for overriding defaults provided herein, e.g.,
override def configureHttpsServer(server: Http.Server): Http.Server = { server .withMaxInitialLineSize(2048) .withTransport.tls(....) }
- server
- the com.twitter.finagle.Http.Server to configure.
- returns
a configured Http.Server.
- Attributes
- protected
- Definition Classes
- HttpServerTrait
- final def createFlag[T](name: String, default: T, help: String, flaggable: Flaggable[T]): Flag[T]
- Definition Classes
- AbstractApp
- final def createMandatoryFlag[T](name: String, help: String, usage: String, flaggable: Flaggable[T]): Flag[T]
- Definition Classes
- AbstractApp
- def debug(marker: Marker, message: => Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
- def debug(message: => Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
- def debug(marker: Marker, message: => Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
- def debug(message: => Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
- def debugResult[T](message: => String)(fn: => T): T
- Attributes
- protected[this]
- Definition Classes
- Logging
- def defaultAdminPort: Int
- Definition Classes
- AdminHttpServer
- def defaultCloseGracePeriod: Duration
- Definition Classes
- App
- def defaultHttpAnnouncement: String
Default server announcement String for the HTTP server used as the Flag default value for httpAnnounceFlag.
Default server announcement String for the HTTP server used as the Flag default value for httpAnnounceFlag. 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 httpAnnounceFlag Flag value.
- Attributes
- protected
- Definition Classes
- HttpServerTrait
- See also
String)
- def defaultHttpPort: String
Default external HTTP port used as the Flag default value for httpPortFlag.
Default external HTTP port used as the Flag default value for httpPortFlag. 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 httpPortFlag Flag value.
- Attributes
- protected
- Definition Classes
- HttpServerTrait
- See also
com.twitter.finatra.http.HttpServerTrait.httpPortFlag
- def defaultHttpServerName: String
Default server name for the external HTTP interface used as the Flag default value for httpServerNameFlag.
Default server name for the external HTTP interface used as the Flag default value for httpServerNameFlag. This can be overridden to provide a different default programmatically when a flag value cannot be passed.
In general, users should prefer setting the httpServerNameFlag Flag value.
- Attributes
- protected
- Definition Classes
- HttpServerTrait
- See also
com.twitter.finatra.http.HttpServerTrait.httpServerNameFlag
- def defaultHttpsAnnouncement: String
Default server announcement String for the HTTPS server used as the Flag default value for httpsAnnounceFlag.
Default server announcement String for the HTTPS server used as the Flag default value for httpsAnnounceFlag. 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 httpsAnnounceFlag Flag value.
- Attributes
- protected
- Definition Classes
- HttpServerTrait
- See also
String)
- def defaultHttpsPort: String
Default external HTTPS port used as the Flag default value for httpsPortFlag.
Default external HTTPS port used as the Flag default value for httpsPortFlag. 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 httpsPortFlag Flag value.
- Attributes
- protected
- Definition Classes
- HttpServerTrait
- See also
com.twitter.finatra.http.HttpServerTrait.httpsPortFlag
- def defaultHttpsServerName: String
Default server name for serving the external HTTPS interface used as the Flag default value for httpsServerNameFlag.
Default server name for serving the external HTTPS interface used as the Flag default value for httpsServerNameFlag. This can be overridden to provide a different default programmatically when a flag value cannot be passed.
In general, users should prefer setting the httpsServerNameFlag Flag value.
- Attributes
- protected
- Definition Classes
- HttpServerTrait
- See also
com.twitter.finatra.http.HttpServerTrait.httpsServerNameFlag
- def defaultMaxRequestSize: StorageUnit
Default maximum request message size this server can receive used as the Flag default value for maxRequestSizeFlag.
Default maximum request message size this server can receive used as the Flag default value for maxRequestSizeFlag. This can be overridden to provide a different default programmatically when a flag value cannot be passed. The format of this flag is expected to be a String which is parsable into a com.twitter.util.StorageUnit.
In general, users should prefer setting the maxRequestSizeFlag Flag value.
- Attributes
- protected
- Definition Classes
- HttpServerTrait
- See also
com.twitter.finatra.http.HttpServerTrait.maxRequestSizeFlag
- def defaultShutdownTimeout: Duration
Default shutdown timeout used as the Flag default value for shutdownTimeoutFlag.
Default shutdown timeout used as the Flag default value for shutdownTimeoutFlag. 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 shutdownTimeoutFlag Flag value.
- Attributes
- protected
- Definition Classes
- HttpServerTrait
- Note
the value is used to denote a delta "from now", that is this value is applied as:
server.close(shutdownTimeoutDuration.fromNow())- See also
Time)
com.twitter.finatra.http.HttpServerTrait.shutdownTimeoutFlag
- def disableAdminHttpServer: Boolean
- Attributes
- protected
- Definition Classes
- AdminHttpServer
- val dtabAddBaseFlag: Flag[Dtab]
- Definition Classes
- DtabFlags
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def error(marker: Marker, message: => Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
- def error(message: => Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
- def error(marker: Marker, message: => Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
- def error(message: => Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
- def errorResult[T](message: => String)(fn: => T): T
- Attributes
- protected[this]
- Definition Classes
- Logging
- def exitOnError(reason: String, details: => String): Unit
- Attributes
- protected
- Definition Classes
- App
- def exitOnError(reason: String): Unit
- Attributes
- protected
- Definition Classes
- App
- def exitOnError(throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- App
- def failfastOnFlagsNotParsed: Boolean
- Attributes
- protected
- Definition Classes
- App → App
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def flag: Flags
- Definition Classes
- App
- def frameworkConfigureHttpServer(server: Server): Server
- Attributes
- protected[finatra]
- Definition Classes
- HttpServerTrait
- def frameworkConfigureHttpsServer(server: Server): Server
- Attributes
- protected[finatra]
- Definition Classes
- HttpServerTrait
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val group: String
- Definition Classes
- Lifecycle
- def handle(clazz: Class[_ <: Handler]): Unit
- Attributes
- protected
- Definition Classes
- TwitterServer
- def handle[T <: Handler]()(implicit arg0: Manifest[T]): Unit
- Attributes
- protected
- Definition Classes
- TwitterServer
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def httpBoundAddress: Option[InetSocketAddress]
The address to which the underlying Http ListeningServer is bound
The address to which the underlying Http ListeningServer is bound
- Attributes
- protected
- Definition Classes
- HttpServerTrait
- Note
this returns None before the postWarmup() lifecycle phase is done or if the server fails to start up.
- def httpExternalPort: Option[Int]
- Definition Classes
- HttpServerTrait → Ports
- def httpResponseClassifierModule: Module
Default com.twitter.inject.TwitterModule for providing an HttpResponseClassifier.
Default com.twitter.inject.TwitterModule for providing an HttpResponseClassifier.
- returns
a com.twitter.inject.TwitterModule which provides an HttpResponseClassifier implementation.
- Attributes
- protected
- Definition Classes
- HttpServerTrait
- final def httpsBoundAddress: Option[InetSocketAddress]
The address to which the underlying Https ListeningServer is bound
The address to which the underlying Https ListeningServer is bound
- Attributes
- protected
- Definition Classes
- HttpServerTrait
- Note
this returns None before the postWarmup() lifecycle phase is done or if the server fails to start up.
- def httpsExternalPort: Option[Int]
- Definition Classes
- HttpServerTrait → Ports
- def includeGlobalFlags: Boolean
- Attributes
- protected
- Definition Classes
- App
- def info(marker: Marker, message: => Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
- def info(message: => Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
- def info(marker: Marker, message: => Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
- def info(message: => Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
- def infoResult[T](message: => String)(fn: => T): T
- Attributes
- protected[this]
- Definition Classes
- Logging
- final def init(f: => Unit): Unit
- Attributes
- protected
- Definition Classes
- App
- def injector: Injector
- Definition Classes
- App
- final def isClosed: Boolean
- Definition Classes
- CloseOnce
- def isDebugEnabled(marker: Marker): Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
- def isDebugEnabled: Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
- def isErrorEnabled(marker: Marker): Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
- def isErrorEnabled: Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
- def isInfoEnabled(marker: Marker): Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
- def isInfoEnabled: Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isReady(implicit permit: CanAwait): Boolean
- Definition Classes
- CloseOnceAwaitably0 → Awaitable
- def isTraceEnabled(marker: Marker): Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
- def isTraceEnabled: Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
- def isWarnEnabled(marker: Marker): Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
- def isWarnEnabled: Boolean
- Attributes
- protected[this]
- Definition Classes
- Logging
- def javaModules: Collection[Module]
- Attributes
- protected
- Definition Classes
- App
- def javaOverrideModules: Collection[Module]
- Attributes
- protected
- Definition Classes
- App
- def libraryName: String
- Attributes
- protected
- Definition Classes
- TwitterServer → AdminHttpServer
- def linterRules: Seq[Rule]
- Definition Classes
- Linters
- def loadModules(): InstalledModules
- Attributes
- protected[inject]
- Definition Classes
- App
- def loadServiceBindings: Seq[Binding[_]]
- Attributes
- protected[this]
- Definition Classes
- App
- final def logger: Logger
- Attributes
- protected[this]
- Definition Classes
- Logging
- final def loggerName: String
- Attributes
- protected[this]
- Definition Classes
- Logging
- final def main(): Unit
- Definition Classes
- TwitterServer → App
- final def main(args: Array[String]): Unit
- Definition Classes
- App
- def modules: Seq[Module]
- Attributes
- protected
- Definition Classes
- App
- def name: String
- Definition Classes
- App
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def nonExitingMain(args: Array[String]): Unit
- Definition Classes
- App
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def observe(event: Event)(f: => Unit): Unit
- Attributes
- protected
- Definition Classes
- Lifecycle
- final def observeFuture(event: Event)(f: Future[Unit]): Future[Unit]
- Attributes
- protected
- Definition Classes
- Lifecycle
- def onExit(): Unit
- Definition Classes
- AbstractApp
- final def onExit(f: => Unit): Unit
- Attributes
- protected
- Definition Classes
- App
- def onExitLast(): Unit
- Definition Classes
- AbstractApp
- final def onExitLast(f: => Unit): Unit
- Attributes
- protected
- Definition Classes
- App
- def onInit(): Unit
- Definition Classes
- AbstractApp
- def overrideModules: Seq[Module]
- Attributes
- protected
- Definition Classes
- App
- def parseArgs(args: Array[String]): Unit
- Attributes
- protected[this]
- Definition Classes
- App
- def postInjectorStartup(): Unit
- Attributes
- protected
- Definition Classes
- TwitterServer → App
- Annotations
- @Lifecycle()
- def postMain(): Unit
- Definition Classes
- AbstractApp
- def postWarmup(): Unit
- Attributes
- protected
- Definition Classes
- HttpServerTrait → TwitterServer → App
- Annotations
- @Lifecycle()
- final def postmain(f: => Unit): Unit
- Attributes
- protected
- Definition Classes
- App
- def preMain(): Unit
- Definition Classes
- AbstractApp
- def prebindWarmup(): Unit
- Definition Classes
- Warmup
- final def premain(f: => Unit): Unit
- Attributes
- protected
- Definition Classes
- App
- def ready(timeout: Duration)(implicit permit: CanAwait): AbstractHttpServerTrait.this.type
- Definition Classes
- CloseOnceAwaitably0 → Awaitable
- def resolveFinagleClientsOnStartup: Boolean
- Attributes
- protected
- Definition Classes
- TwitterServer
- def result(timeout: Duration)(implicit permit: CanAwait): Unit
- Definition Classes
- CloseOnceAwaitably0 → Awaitable
- def routes: Seq[Route]
- Definition Classes
- AdminHttpServer
- final def run(): Unit
- Attributes
- protected
- Definition Classes
- TwitterServer → App
- final def runOnExit(runnable: Runnable): Unit
- Attributes
- protected
- Definition Classes
- App
- final def runOnExitLast(runnable: Runnable): Unit
- Attributes
- protected
- Definition Classes
- App
- def setup(): Unit
- Attributes
- protected
- Definition Classes
- TwitterServer
- lazy val shutdownTimer: Timer
- Attributes
- protected
- Definition Classes
- TwitterServer → App
- def start(): Unit
- Attributes
- protected
- Definition Classes
- TwitterServer
- def startAdminHttpServer(): Unit
- Attributes
- protected
- Definition Classes
- AdminHttpServer
- final def startupCompletionEvent: Event
- Attributes
- protected[twitter]
- Definition Classes
- TwitterServer → Warmup → TwitterServer
- def statsReceiver: StatsReceiver
- Definition Classes
- Stats
- def statsReceiverModule: Module
- Attributes
- protected
- Definition Classes
- TwitterServer
- def streamRequest: Boolean
If false, the underlying Netty pipeline collects HttpChunks into the body of each Request Set to true if you wish to stream parse requests using request.reader.read
If false, the underlying Netty pipeline collects HttpChunks into the body of each Request Set to true if you wish to stream parse requests using request.reader.read
- Attributes
- protected
- Definition Classes
- HttpServerTrait
- final val suppressGracefulShutdownErrors: Boolean
- Definition Classes
- TwitterServer → App
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def thriftPort: Option[Int]
- Definition Classes
- Ports
- def toString(): String
- Definition Classes
- AnyRef → Any
- def trace(marker: Marker, message: => Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
- def trace(message: => Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
- def trace(marker: Marker, message: => Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
- def trace(message: => Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
- def traceResult[T](message: => String)(fn: => T): T
- Attributes
- protected[this]
- Definition Classes
- Logging
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def warmup(): Unit
- Attributes
- protected
- Definition Classes
- TwitterServer → App
- def warmupComplete(): Unit
- Definition Classes
- Warmup
- def warn(marker: Marker, message: => Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
- def warn(message: => Any, cause: Throwable): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
- def warn(marker: Marker, message: => Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
- def warn(message: => Any): Unit
- Attributes
- protected[this]
- Definition Classes
- Logging
- def warnResult[T](message: => String)(fn: => T): T
- Attributes
- protected[this]
- Definition Classes
- Logging