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

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `VertxServerBuilder` | `addService​(BindableService bindableService)` |
    `VertxServerBuilder` | `addService​(ServerServiceDefinition service)` |
    `VertxServerBuilder` | `addStreamTracerFactory​(ServerStreamTracer.Factory factory)` |
    `VertxServerBuilder` | `addTransportFilter​(ServerTransportFilter filter)` |
    `VertxServer` | `build()` |
    `VertxServerBuilder` | `commandDecorator​(java.util.function.Consumer<Runnable> commandDecorator)` | Add a command decorator for the grpc calls.
    `VertxServerBuilder` | `compressorRegistry​(CompressorRegistry registry)` |
    `VertxServerBuilder` | `decompressorRegistry​(DecompressorRegistry registry)` |
    `VertxServerBuilder` | `directExecutor()` |
    `VertxServerBuilder` | `executor​(Executor executor)` |
    `VertxServerBuilder` | `fallbackHandlerRegistry​(HandlerRegistry fallbackRegistry)` |
    `static VertxServerBuilder` | `forAddress​(Vertx vertx, String host, int port)` |
    `static VertxServerBuilder` | `forAddress​(Vertx vertx, SocketAddress address)` |
    `static VertxServerBuilder` | `forPort​(Vertx vertx, int port)` |
    `VertxServerBuilder` | `handshakeTimeout​(long timeout, TimeUnit unit)` |
    `VertxServerBuilder` | `intercept​(ServerInterceptor interceptor)` |
    `VertxServerBuilder` | `maxInboundMessageSize​(int bytes)` |
    `VertxServerBuilder` | `maxInboundMetadataSize​(int bytes)` |
    `NettyServerBuilder` | `nettyBuilder()` |
    `VertxServerBuilder` | `setBinaryLog​(BinaryLog binaryLog)` |
    `VertxServerBuilder` | `useSsl​(Handler<HttpServerOptions> handler)` |
    `VertxServerBuilder` | `useTransportSecurity​(File certChain, File privateKey)` |
    `VertxServerBuilder` | `useTransportSecurity​(InputStream certChain, InputStream privateKey)` |

    - ### Methods inherited from class io.grpc.ServerBuilder

      `addServices, callExecutor, forPort, keepAliveTime, keepAliveTimeout, maxConnectionAge, maxConnectionAgeGrace, maxConnectionIdle, permitKeepAliveTime, permitKeepAliveWithoutCalls`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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 class `ServerBuilder<VertxServerBuilder>`

    - #### executor

          public VertxServerBuilder executor​(@Nullable
                                             Executor executor)

      Specified by:
        `executor` in class `ServerBuilder<VertxServerBuilder>`

    - #### addService

          public VertxServerBuilder addService​(ServerServiceDefinition service)

      Specified by:
        `addService` in class `ServerBuilder<VertxServerBuilder>`

    - #### addService

          public VertxServerBuilder addService​(BindableService bindableService)

      Specified by:
        `addService` in class `ServerBuilder<VertxServerBuilder>`

    - #### fallbackHandlerRegistry

          public VertxServerBuilder fallbackHandlerRegistry​(@Nullable
                                                            HandlerRegistry fallbackRegistry)

      Specified by:
        `fallbackHandlerRegistry` in class `ServerBuilder<VertxServerBuilder>`

    - #### useTransportSecurity

          public VertxServerBuilder useTransportSecurity​(File certChain,
                                                         File privateKey)

      Specified by:
        `useTransportSecurity` in class `ServerBuilder<VertxServerBuilder>`

    - #### addTransportFilter

          public VertxServerBuilder addTransportFilter​(ServerTransportFilter filter)

      Overrides:
        `addTransportFilter` in class `ServerBuilder<VertxServerBuilder>`

    - #### addStreamTracerFactory

          public VertxServerBuilder addStreamTracerFactory​(ServerStreamTracer.Factory factory)

      Overrides:
        `addStreamTracerFactory` in class `ServerBuilder<VertxServerBuilder>`

    - #### decompressorRegistry

          public VertxServerBuilder decompressorRegistry​(@Nullable
                                                         DecompressorRegistry registry)

      Specified by:
        `decompressorRegistry` in class `ServerBuilder<VertxServerBuilder>`

    - #### compressorRegistry

          public VertxServerBuilder compressorRegistry​(@Nullable
                                                       CompressorRegistry registry)

      Specified by:
        `compressorRegistry` in class `ServerBuilder<VertxServerBuilder>`

    - #### intercept

          public VertxServerBuilder intercept​(ServerInterceptor interceptor)

      Overrides:
        `intercept` in class `ServerBuilder<VertxServerBuilder>`

    - #### useTransportSecurity

          public VertxServerBuilder useTransportSecurity​(InputStream certChain,
                                                         InputStream privateKey)

      Overrides:
        `useTransportSecurity` in class `ServerBuilder<VertxServerBuilder>`

    - #### handshakeTimeout

          public VertxServerBuilder handshakeTimeout​(long timeout,
                                                     TimeUnit unit)

      Overrides:
        `handshakeTimeout` in class `ServerBuilder<VertxServerBuilder>`

    - #### maxInboundMessageSize

          public VertxServerBuilder maxInboundMessageSize​(int bytes)

      Overrides:
        `maxInboundMessageSize` in class `ServerBuilder<VertxServerBuilder>`

    - #### setBinaryLog

          public VertxServerBuilder setBinaryLog​(BinaryLog binaryLog)

      Overrides:
        `setBinaryLog` in class `ServerBuilder<VertxServerBuilder>`

    - #### maxInboundMetadataSize

          public VertxServerBuilder maxInboundMetadataSize​(int bytes)

      Overrides:
        `maxInboundMetadataSize` in class `ServerBuilder<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 class `ServerBuilder<VertxServerBuilder>`