Class ShadedNettyGrpcServerFactory

java.lang.Object
net.devh.boot.grpc.server.serverfactory.AbstractGrpcServerFactory<io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder>
net.devh.boot.grpc.server.serverfactory.ShadedNettyGrpcServerFactory
All Implemented Interfaces:
GrpcServerFactory

public class ShadedNettyGrpcServerFactory extends AbstractGrpcServerFactory<io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder>
Factory for shaded netty based grpc servers.
  • Constructor Details

    • ShadedNettyGrpcServerFactory

      public ShadedNettyGrpcServerFactory(GrpcServerProperties properties, List<GrpcServerConfigurer> serverConfigurers)
      Creates a new shaded netty server factory with the given properties.
      Parameters:
      properties - The properties used to configure the server.
      serverConfigurers - The server configurers to use. Can be empty.
  • Method Details

    • newServerBuilder

      protected io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder newServerBuilder()
      Description copied from class: AbstractGrpcServerFactory
      Creates a new server builder.
      Specified by:
      newServerBuilder in class AbstractGrpcServerFactory<io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder>
      Returns:
      The newly created server builder.
    • configureConnectionLimits

      protected void configureConnectionLimits(io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder builder)
      Description copied from class: AbstractGrpcServerFactory
      Configures the keep alive options that should be used by the server.
      Overrides:
      configureConnectionLimits in class AbstractGrpcServerFactory<io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder>
      Parameters:
      builder - The server builder to configure.
    • configureKeepAlive

      protected void configureKeepAlive(io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder builder)
      Description copied from class: AbstractGrpcServerFactory
      Configures the keep alive options that should be used by the server.
      Overrides:
      configureKeepAlive in class AbstractGrpcServerFactory<io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder>
      Parameters:
      builder - The server builder to configure.
    • configureSecurity

      protected void configureSecurity(io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder builder)
      Description copied from class: AbstractGrpcServerFactory
      Configures the security options that should be used by the server.
      Overrides:
      configureSecurity in class AbstractGrpcServerFactory<io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder>
      Parameters:
      builder - The server builder to configure.
    • newServerSslContextBuilder

      protected static io.grpc.netty.shaded.io.netty.handler.ssl.SslContextBuilder newServerSslContextBuilder(GrpcServerProperties.Security security)
      Creates a new server ssl context builder.
      Parameters:
      security - The security configuration to use.
      Returns:
      The newly created SslContextBuilder.
    • configureAcceptedClientCertificates

      protected static void configureAcceptedClientCertificates(GrpcServerProperties.Security security, io.grpc.netty.shaded.io.netty.handler.ssl.SslContextBuilder sslContextBuilder)
      Configures the client certificates accepted by the ssl context.
      Parameters:
      security - The security configuration to use.
      sslContextBuilder - The ssl context builder to configure.
    • of

      protected static io.grpc.netty.shaded.io.netty.handler.ssl.ClientAuth of(ClientAuth clientAuth)
      Converts the given client auth option to netty's client auth.
      Parameters:
      clientAuth - The client auth option to convert.
      Returns:
      The converted client auth option.