Package io.vertx.grpc
Class VertxServerBuilder
- java.lang.Object
-
- io.grpc.ServerBuilder<VertxServerBuilder>
-
- io.vertx.grpc.VertxServerBuilder
-
public class VertxServerBuilder extends ServerBuilder<VertxServerBuilder>
- Author:
- Julien Viet
-
-
Method Summary
-
Methods inherited from class io.grpc.ServerBuilder
addServices, callExecutor, forPort, keepAliveTime, keepAliveTimeout, maxConnectionAge, maxConnectionAgeGrace, maxConnectionIdle, permitKeepAliveTime, permitKeepAliveWithoutCalls
-
-
-
-
Method Detail
-
forPort
public static VertxServerBuilder forPort(Vertx vertx, int port)
-
forAddress
public static VertxServerBuilder forAddress(Vertx vertx, SocketAddress address)
-
forAddress
public static VertxServerBuilder forAddress(Vertx vertx, String host, int port)
-
nettyBuilder
public NettyServerBuilder nettyBuilder()
- Returns:
- the underlying
NettyServerBuilder
-
directExecutor
public VertxServerBuilder directExecutor()
- Specified by:
directExecutor
in classServerBuilder<VertxServerBuilder>
-
executor
public VertxServerBuilder executor(@Nullable Executor executor)
- Specified by:
executor
in classServerBuilder<VertxServerBuilder>
-
addService
public VertxServerBuilder addService(ServerServiceDefinition service)
- Specified by:
addService
in classServerBuilder<VertxServerBuilder>
-
addService
public VertxServerBuilder addService(BindableService bindableService)
- Specified by:
addService
in classServerBuilder<VertxServerBuilder>
-
fallbackHandlerRegistry
public VertxServerBuilder fallbackHandlerRegistry(@Nullable HandlerRegistry fallbackRegistry)
- Specified by:
fallbackHandlerRegistry
in classServerBuilder<VertxServerBuilder>
-
useTransportSecurity
public VertxServerBuilder useTransportSecurity(File certChain, File privateKey)
- Specified by:
useTransportSecurity
in classServerBuilder<VertxServerBuilder>
-
addTransportFilter
public VertxServerBuilder addTransportFilter(ServerTransportFilter filter)
- Overrides:
addTransportFilter
in classServerBuilder<VertxServerBuilder>
-
addStreamTracerFactory
public VertxServerBuilder addStreamTracerFactory(ServerStreamTracer.Factory factory)
- Overrides:
addStreamTracerFactory
in classServerBuilder<VertxServerBuilder>
-
decompressorRegistry
public VertxServerBuilder decompressorRegistry(@Nullable DecompressorRegistry registry)
- Specified by:
decompressorRegistry
in classServerBuilder<VertxServerBuilder>
-
compressorRegistry
public VertxServerBuilder compressorRegistry(@Nullable CompressorRegistry registry)
- Specified by:
compressorRegistry
in classServerBuilder<VertxServerBuilder>
-
intercept
public VertxServerBuilder intercept(ServerInterceptor interceptor)
- Overrides:
intercept
in classServerBuilder<VertxServerBuilder>
-
useTransportSecurity
public VertxServerBuilder useTransportSecurity(InputStream certChain, InputStream privateKey)
- Overrides:
useTransportSecurity
in classServerBuilder<VertxServerBuilder>
-
handshakeTimeout
public VertxServerBuilder handshakeTimeout(long timeout, TimeUnit unit)
- Overrides:
handshakeTimeout
in classServerBuilder<VertxServerBuilder>
-
maxInboundMessageSize
public VertxServerBuilder maxInboundMessageSize(int bytes)
- Overrides:
maxInboundMessageSize
in classServerBuilder<VertxServerBuilder>
-
setBinaryLog
public VertxServerBuilder setBinaryLog(BinaryLog binaryLog)
- Overrides:
setBinaryLog
in classServerBuilder<VertxServerBuilder>
-
maxInboundMetadataSize
public VertxServerBuilder maxInboundMetadataSize(int bytes)
- Overrides:
maxInboundMetadataSize
in classServerBuilder<VertxServerBuilder>
-
useSsl
public VertxServerBuilder useSsl(Handler<HttpServerOptions> handler)
-
commandDecorator
public VertxServerBuilder commandDecorator(java.util.function.Consumer<Runnable> commandDecorator)
Add a command decorator for the grpc calls. The decorator provides a way to invoke arbitrary code before handling of the grpc request starts- Parameters:
commandDecorator
- the decorator- Returns:
- this
-
build
public VertxServer build()
- Specified by:
build
in classServerBuilder<VertxServerBuilder>
-
-