@ExperimentalApi(value="https://github.com/grpc/grpc-java/issues/5066") @NotThreadSafe public final class ServletServerBuilder extends io.grpc.ForwardingServerBuilder<ServletServerBuilder>
GrpcServlet directly instead.
The API is experimental. The authors would like to know more about the real usecases. Users are welcome to provide feedback by commenting on the tracking issue.
| Constructor and Description |
|---|
ServletServerBuilder() |
| Modifier and Type | Method and Description |
|---|---|
io.grpc.Server |
build()
Builds a gRPC server that can run as a servlet.
|
ServletAdapter |
buildServletAdapter()
Creates a
ServletAdapter. |
protected io.grpc.ServerBuilder<?> |
delegate() |
ServletServerBuilder |
maxInboundMessageSize(int bytes) |
ServletServerBuilder |
scheduledExecutorService(ScheduledExecutorService scheduler)
Provides a custom scheduled executor service to the server builder.
|
ServletServerBuilder |
useTransportSecurity(File certChain,
File privateKey)
Throws
UnsupportedOperationException. |
addService, addService, addStreamTracerFactory, addTransportFilter, callExecutor, compressorRegistry, decompressorRegistry, directExecutor, executor, fallbackHandlerRegistry, forPort, handshakeTimeout, intercept, keepAliveTime, keepAliveTimeout, maxConnectionAge, maxConnectionAgeGrace, maxConnectionIdle, maxInboundMetadataSize, permitKeepAliveTime, permitKeepAliveWithoutCalls, setBinaryLog, toString, useTransportSecuritypublic io.grpc.Server build()
The returned server will not be started or bound to a port.
Users should not call this method directly. Instead users should call
buildServletAdapter() which internally will call build() and start()
appropriately.
build in class io.grpc.ForwardingServerBuilder<ServletServerBuilder>IllegalStateException - if this method is called by users directlypublic ServletAdapter buildServletAdapter()
ServletAdapter.@Internal protected io.grpc.ServerBuilder<?> delegate()
delegate in class io.grpc.ForwardingServerBuilder<ServletServerBuilder>public ServletServerBuilder useTransportSecurity(File certChain, File privateKey)
UnsupportedOperationException. TLS should be configured by the servlet
container.useTransportSecurity in class io.grpc.ForwardingServerBuilder<ServletServerBuilder>public ServletServerBuilder maxInboundMessageSize(int bytes)
maxInboundMessageSize in class io.grpc.ForwardingServerBuilder<ServletServerBuilder>public ServletServerBuilder scheduledExecutorService(ScheduledExecutorService scheduler)