.workerGroup(eventLoop(), false) .service(path(), service); serverConfigurators.forEach(configurator -> configurator.accept(serverBuilder));
@Override protected void configure(ServerBuilder sb) throws Exception { sb.workerGroup(EventLoopGroups.newEventLoopGroup(1), true); sb.defaultMaxRequestLength(MAX_MESSAGE_SIZE); sb.idleTimeoutMillis(0);
@Override protected void configure(ServerBuilder sb) throws Exception { sb.workerGroup(EventLoopGroups.newEventLoopGroup(1), true); sb.defaultMaxRequestLength(Long.MAX_VALUE); sb.serviceUnder("/", new GrpcServiceBuilder() .addService(new UnitTestServiceImpl()) .build() .decorate(LoggingService.newDecorator()) .decorate((delegate, ctx, req) -> { ctx.log().addListener(requestLogQueue::add, RequestLogAvailability.COMPLETE); return delegate.serve(ctx, req); })); } };
@Override protected void configure(ServerBuilder sb) throws Exception { sb.workerGroup(EventLoopGroups.newEventLoopGroup(1), true); sb.defaultMaxRequestLength(0); sb.serviceUnder("/", new GrpcServiceBuilder() .addService(new UnitTestServiceImpl()) .build() .decorate(LoggingService.newDecorator()) .decorate((delegate, ctx, req) -> { ctx.log().addListener(requestLogQueue::add, RequestLogAvailability.COMPLETE); return delegate.serve(ctx, req); })); } };
@Override protected void configure(ServerBuilder sb) throws Exception { sb.workerGroup(EventLoopGroups.newEventLoopGroup(1), true); sb.defaultMaxRequestLength(0); sb.serviceUnder("/", new GrpcServiceBuilder() .setMaxInboundMessageSizeBytes(MAX_MESSAGE_SIZE) .addService(new UnitTestServiceImpl()) .enableUnframedRequests(true) .supportedSerializationFormats(GrpcSerializationFormats.values()) .build() .decorate(LoggingService.newDecorator()) .decorate((delegate, ctx, req) -> { ctx.log().addListener(requestLogQueue::add, RequestLogAvailability.COMPLETE); return delegate.serve(ctx, req); })); } };
numWorkers -> sb.workerGroup(EventLoopGroups.newEventLoopGroup(numWorkers), true)); cfg.maxNumConnections().ifPresent(sb::maxNumConnections); cfg.idleTimeoutMillis().ifPresent(sb::idleTimeoutMillis);
numWorkers -> sb.workerGroup(EventLoopGroups.newEventLoopGroup(numWorkers), true)); cfg.maxNumConnections().ifPresent(sb::maxNumConnections); cfg.idleTimeoutMillis().ifPresent(sb::idleTimeoutMillis);
numWorkers -> sb.workerGroup(EventLoopGroups.newEventLoopGroup(numWorkers), true)); cfg.maxNumConnections().ifPresent(sb::maxNumConnections); cfg.idleTimeoutMillis().ifPresent(sb::idleTimeoutMillis);