case class Server(stack: Stack[ServiceFactory[Request, Response]] = Server.stack, params: Params = Server.params) extends StdStackServer[Request, Response, Server] with Product with Serializable
- Alphabetic
- By Inheritance
- Server
- Serializable
- Serializable
- Product
- Equals
- StdStackServer
- ListeningStackServer
- WithServerAdmissionControl
- WithServerSession
- WithServerTransport
- CommonParams
- StackServer
- StackBasedServer
- Transformable
- Parameterized
- Server
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Server(stack: Stack[ServiceFactory[Request, Response]] = Server.stack, params: Params = Server.params)
Type Members
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
def
addServerToRegistry(listenerName: String): Unit
- Attributes
- protected
- Definition Classes
- ListeningStackServer
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
configured[P](psp: (P, Param[P])): Server
- Definition Classes
- Server → ListeningStackServer → StackServer → Parameterized
-
def
configured[P](p: P)(implicit arg0: Param[P]): Server
- Definition Classes
- ListeningStackServer → StackServer → Parameterized
-
def
configuredParams(newParams: Params): Server
- Definition Classes
- Server → ListeningStackServer → StackServer → Parameterized
-
def
copy1(stack: Stack[ServiceFactory[Request, Response]] = this.stack, params: Params = this.params): Server
- Attributes
- protected
- Definition Classes
- Server → ListeningStackServer
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
newDispatcher(transport: Transport[In, Out] { type Context <: Server.this.Context }, service: Service[Request, Response]): HttpServerDispatcher
- Attributes
- protected
- Definition Classes
- Server → StdStackServer
-
def
newListener(): Listener[Any, Any, TransportContext]
- Attributes
- protected
- Definition Classes
- Server → StdStackServer
-
final
def
newListeningServer(serviceFactory: ServiceFactory[Request, Response], addr: SocketAddress)(trackSession: (ClientConnection) ⇒ Unit): ListeningServer
- Attributes
- protected
- Definition Classes
- StdStackServer → ListeningStackServer
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
val
params: Params
- Definition Classes
- Server → StackServer → Parameterized
-
def
serve(addr: SocketAddress, factory: ServiceFactory[Request, Response]): ListeningServer
- Definition Classes
- Server → ListeningStackServer → Server
-
final
def
serve(addr: String, service: Service[Request, Response]): ListeningServer
- Definition Classes
- Server
-
final
def
serve(addr: String, service: ServiceFactory[Request, Response]): ListeningServer
- Definition Classes
- Server
-
final
def
serve(addr: SocketAddress, service: Service[Request, Response]): ListeningServer
- Definition Classes
- Server
-
def
serveAndAnnounce(name: String, service: Service[Request, Response]): ListeningServer
- Definition Classes
- Server
-
def
serveAndAnnounce(name: String, service: ServiceFactory[Request, Response]): ListeningServer
- Definition Classes
- Server
-
def
serveAndAnnounce(name: String, addr: String, service: Service[Request, Response]): ListeningServer
- Definition Classes
- Server
-
def
serveAndAnnounce(name: String, addr: String, service: ServiceFactory[Request, Response]): ListeningServer
- Definition Classes
- Server
-
def
serveAndAnnounce(name: String, addr: SocketAddress, service: Service[Request, Response]): ListeningServer
- Definition Classes
- Server
-
def
serveAndAnnounce(name: String, addr: SocketAddress, service: ServiceFactory[Request, Response]): ListeningServer
- Definition Classes
- Server
-
val
stack: Stack[ServiceFactory[Request, Response]]
- Definition Classes
- Server → StackServer
-
def
superServe(addr: SocketAddress, factory: ServiceFactory[Request, Response]): ListeningServer
- Attributes
- protected
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
transformed(t: Transformer): Server
- Definition Classes
- ListeningStackServer → StackServer → Transformable
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
val
withAdmissionControl: ServerAdmissionControlParams[Server]
- Definition Classes
- Server → WithServerAdmissionControl
-
def
withCompressionLevel(level: Int): Server
The compression level to use.
The compression level to use. If passed the default value (-1) then it will use TextualContentCompressor which will compress text-like content-types with the default compression level (6). Otherwise, use the Netty
HttpContentCompressorfor all content-types with specified compression level. -
def
withDecompression(enabled: Boolean): Server
Enables decompression of http content bodies.
-
def
withExceptionStatsHandler(exceptionStatsHandler: ExceptionStatsHandler): Server
- Definition Classes
- Server → CommonParams
-
def
withExecutionOffloaded(pool: FuturePool): Server
- Definition Classes
- Server → CommonParams
-
def
withExecutionOffloaded(executor: ExecutorService): Server
- Definition Classes
- Server → CommonParams
-
def
withHttp2: Server
Enable HTTP/2
Enable HTTP/2
- Note
this will override whatever has been set in the toggle.
-
def
withHttpStats: Server
Enable the collection of HTTP specific metrics.
Enable the collection of HTTP specific metrics. See http.filter.StatsFilter.
-
def
withKerberos(serverKerberosConfiguration: ServerKerberosConfiguration): Server
Enable kerberos server authentication for http requests
-
def
withLabel(label: String): Server
- Definition Classes
- Server → CommonParams
-
def
withLabels(keywords: String*): Server
- Definition Classes
- CommonParams
-
def
withMaxHeaderSize(size: StorageUnit): Server
For HTTP1*, configures the max size of headers For HTTP2, sets the MAX_HEADER_LIST_SIZE setting which is the maximum number of uncompressed bytes of header name/values.
For HTTP1*, configures the max size of headers For HTTP2, sets the MAX_HEADER_LIST_SIZE setting which is the maximum number of uncompressed bytes of header name/values. These may be set independently via the .configured API.
-
def
withMaxInitialLineSize(size: StorageUnit): Server
Configures the maximum initial http line length the server is willing to accept.
-
def
withMaxRequestSize(size: StorageUnit): Server
Configures the maximum request size this server can receive.
-
def
withMonitor(monitor: Monitor): Server
- Definition Classes
- Server → CommonParams
-
def
withNoAutomaticContinue: Server
By default finagle-http automatically sends 100-CONTINUE responses to inbound requests which set the 'Expect: 100-Continue' header.
By default finagle-http automatically sends 100-CONTINUE responses to inbound requests which set the 'Expect: 100-Continue' header. Streaming servers will always return 100-CONTINUE. Non-streaming servers will compare the content-length header to the configured limit (see:
withMaxRequestSize) and send either a 100-CONTINUE or 413-REQUEST ENTITY TOO LARGE as appropriate. This method disables those automatic responses.- Note
Servers operating as proxies should disable automatic responses in order to allow origin servers to determine whether the expectation can be met.
,Disabling automatic continues is only supported in com.twitter.finagle.Http.HttpImpl.Netty4Impl servers.
-
def
withNoHttp2: Server
Disable HTTP/2
Disable HTTP/2
- Note
this will override whatever has been set in the toggle.
-
def
withParams(params: Params): Server
- Definition Classes
- ListeningStackServer → StackServer → Parameterized
-
def
withRequestTimeout(timeout: Duration): Server
- Definition Classes
- Server → CommonParams
-
def
withRequestTimeout(timeout: Tunable[Duration]): Server
- Definition Classes
- CommonParams
-
def
withResponseClassifier(responseClassifier: ResponseClassifier): Server
- Definition Classes
- Server → CommonParams
-
val
withSession: ServerSessionParams[Server]
- Definition Classes
- Server → WithServerSession
-
def
withStack(fn: (Stack[ServiceFactory[Request, Response]]) ⇒ Stack[ServiceFactory[Request, Response]]): Server
- Definition Classes
- Server → ListeningStackServer → StackServer
-
def
withStack(stack: Stack[ServiceFactory[Request, Response]]): Server
- Definition Classes
- Server → ListeningStackServer → StackServer
-
def
withStatsReceiver(statsReceiver: StatsReceiver): Server
- Definition Classes
- Server → CommonParams
-
def
withStreaming(fixedLengthStreamedAfter: StorageUnit): Server
Streaming allows applications to work with HTTP messages that have large (or infinite) content bodies.
Streaming allows applications to work with HTTP messages that have large (or infinite) content bodies.
This method configures
fixedLengthStreamedAfterlimit, which effectively turns on streaming (thinkwithStreaming(true)). ThefixedLengthStreamedAfter, however, disables streaming for sufficiently small messages of known fixed length.If
Content-Lengthof a message does not exceedfixedLengthStreamedAfterit is buffered and its content is available through Request.content or Request.contentString.Messages without
Content-Lengthheader are always streamed regardless of their actual content length and thefixedLengthStreamedAftervalue.Request.isChunked should be used to determine whether a message is streamed (
isChunked == true) or buffered (isChunked == false). -
def
withStreaming(enabled: Boolean): Server
Streaming allows applications to work with HTTP messages that have large (or infinite) content bodies.
Streaming allows applications to work with HTTP messages that have large (or infinite) content bodies.
If
enabledis set totrue, the message content is available through a com.twitter.io.Reader, which gives the application a handle to the byte stream.If
enabledis set tofalse, the entire message content is buffered up to maximum allowed message size. -
def
withTracer(tracer: Tracer): Server
- Definition Classes
- Server → CommonParams
-
val
withTransport: ServerTransportParams[Server]
- Definition Classes
- Server → WithServerTransport