Users MUST provide an implementation to configure the provided HttpRouter.
Users MUST provide an implementation to configure the provided HttpRouter. The HttpRouter
exposes a DSL which results in a configured Finagle Service[-Request, +Response]
to serve on
the ListeningServer.
the HttpRouter to configure.
Default com.twitter.inject.TwitterModule for providing a com.twitter.finagle.filter.LogFormatter.
Default com.twitter.inject.TwitterModule for providing a com.twitter.finagle.filter.LogFormatter.
a com.twitter.inject.TwitterModule which provides a com.twitter.finagle.filter.LogFormatter implementation.
Serve the Service[Request, Response]
from the configured HttpRouter.
Serve the Service[Request, Response]
from the configured HttpRouter.
the InetSocketAddress address to bind the resultant ListeningServer.
the configured Http.Server stack.
a constructed ListeningServer.
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) }
- the com.twitter.finagle.Http.Server to configure.
a configured Http.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(....) }
- the com.twitter.finagle.Http.Server to configure.
a configured Http.Server.
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.
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.
com.twitter.finatra.http.HttpServerTrait.httpPortFlag
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.
com.twitter.finatra.http.HttpServerTrait.httpServerNameFlag
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.
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.
com.twitter.finatra.http.HttpServerTrait.httpsPortFlag
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.
com.twitter.finatra.http.HttpServerTrait.httpsServerNameFlag
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.
com.twitter.finatra.http.HttpServerTrait.maxRequestSizeFlag
com.twitter.finagle.Http.Server.withMaxRequestSize
com.twitter.util.StorageUnit
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.
the value is used to denote a delta "from now", that is this value is applied as:
server.close(shutdownTimeoutDuration.fromNow())
com.twitter.finatra.http.HttpServerTrait.shutdownTimeoutFlag
Time)
The address to which the underlying Http ListeningServer is bound
The address to which the underlying Http ListeningServer is bound
this returns None before the postWarmup() lifecycle phase is done or if the server fails to start up.
Default com.twitter.inject.TwitterModule for providing an HttpResponseClassifier.
Default com.twitter.inject.TwitterModule for providing an HttpResponseClassifier.
a com.twitter.inject.TwitterModule which provides an HttpResponseClassifier implementation.
Configuration of the Service[Request, Response]
to serve on the ListeningServer
is defined by configuring the HttpRouter and not by implementation of this method,
thus this method overridden to be final and set to a NilService
.
Configuration of the Service[Request, Response]
to serve on the ListeningServer
is defined by configuring the HttpRouter and not by implementation of this method,
thus this method overridden to be final and set to a NilService
.
The address to which the underlying Https ListeningServer is bound
The address to which the underlying Https ListeningServer is bound
this returns None before the postWarmup() lifecycle phase is done or if the server fails to start up.
Default com.twitter.inject.TwitterModule for providing a com.twitter.finatra.jackson.ScalaObjectMapper.
Default com.twitter.inject.TwitterModule for providing a com.twitter.finatra.jackson.ScalaObjectMapper.
a com.twitter.inject.TwitterModule which provides a com.twitter.finatra.jackson.ScalaObjectMapper implementation.
Default com.twitter.inject.TwitterModule for providing implementations for a com.twitter.finatra.http.marshalling.DefaultMessageBodyReader and a com.twitter.finatra.http.marshalling.DefaultMessageBodyWriter.
Default com.twitter.inject.TwitterModule for providing implementations for a com.twitter.finatra.http.marshalling.DefaultMessageBodyReader and a com.twitter.finatra.http.marshalling.DefaultMessageBodyWriter.
a com.twitter.inject.TwitterModule which provides implementations for com.twitter.finatra.http.marshalling.DefaultMessageBodyReader and com.twitter.finatra.http.marshalling.DefaultMessageBodyWriter.
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
Default com.twitter.inject.TwitterModule for providing a com.twitter.finatra.validation.Validator.
Default com.twitter.inject.TwitterModule for providing a com.twitter.finatra.validation.Validator.
a com.twitter.inject.TwitterModule which provides a com.twitter.finatra.validation.Validator implementation.
This can be overriden to provide a different Validator. The new Validator will replace the default Validator in jacksonModule, and be used to apply the validation logic in com.fasterxml.jackson.module.scala.ScalaObjectMapper and during HTTP request parsing.
A Finagle server which exposes external HTTP or HTTPS interfaces implemented by a
Service[Request, Response]
configured via an HttpRouter. This trait is intended for use from Scala or with generated Scala code.Java users are encouraged to use AbstractHttpServer instead.