@Override protected void configure(ServerBuilder sb) throws Exception { sb.defaultMaxRequestLength(0); sb.defaultRequestTimeoutMillis(0); sb.serviceUnder("/", new GrpcServiceBuilder() .addService(new FlowControlService()) .setMaxInboundMessageSizeBytes(Integer.MAX_VALUE) .build()); } };
@Override protected void configure(ServerBuilder sb) throws Exception { ssc = new SelfSignedCertificate("example.com"); sb.serverListener(new ServerListenerAdapter() { @Override public void serverStopped(Server server) { executor.shutdown(); ssc.delete(); } }); sb.https(new InetSocketAddress("127.0.0.1", 0)); sb.tls(newSslContext()); sb.defaultMaxRequestLength(16 * 1024 * 1024); sb.serviceUnder("/", new GrpcServiceBuilder() .addService(ServerInterceptors.intercept( new TestServiceImpl(executor), TestServiceImpl.interceptors())) .build() .decorate((delegate, ctx, req) -> { ctxCapture.set(ctx); return delegate.serve(ctx, req); })); }
@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); })); } };