public HttpServer getHttpServer() { if (httpServer == null) { httpServer = getHttpServerBuilder() .setPort(getPort()) .setHost(getHost()) .build(); final Supplier<String> webPageContentsSupplier = getWebPageContentsSupplier(); httpServer.setShouldContinueHttpRequest(httpRequest -> { /* If not the page uri we want to then, just continue by returning true. */ if (!httpRequest.getUri().equals(getHtmlPageLocation())) { return true; } final String webPageContents = webPageContentsSupplier.get(); /* Send the HTML file out to the browser. */ httpRequest.getReceiver().response(200, "text/html", webPageContents); return false; }); } return httpServer; }
public HttpServer build() { final HttpServer httpServer = getFactory().createHttpServer( this.getConfig(), this.getEndpointName(), this.getSystemManager(), this.getServiceDiscovery(), this.getHealthServiceAsync(), this.getServiceDiscoveryTtl(), this.getServiceDiscoveryTtlTimeUnit(), this.getResponseDecorators(), this.getHttpResponseCreator(), this.getRequestBodyContinuePredicate() ); if (requestContinuePredicate != null) { httpServer.setShouldContinueHttpRequest(requestContinuePredicate); } if (qBitSystemManager != null) { qBitSystemManager.registerServer(httpServer); } return httpServer; }
httpServer.setShouldContinueHttpRequest(this.getRequestContinuePredicate());
public HttpServer build() { final HttpServer httpServer = getFactory().createHttpServer( this.getConfig(), this.getEndpointName(), this.getSystemManager(), this.getServiceDiscovery(), this.getHealthServiceAsync(), this.getServiceDiscoveryTtl(), this.getServiceDiscoveryTtlTimeUnit(), this.getResponseDecorators(), this.getHttpResponseCreator() ); if (requestContinuePredicate!=null) { httpServer.setShouldContinueHttpRequest(requestContinuePredicate); } if (qBitSystemManager != null) { qBitSystemManager.registerServer(httpServer); } return httpServer; }
public HttpServer build() { final HttpServer httpServer = getFactory().createHttpServer( this.getConfig(), this.getEndpointName(), this.getSystemManager(), this.getServiceDiscovery(), this.getHealthServiceAsync(), this.getServiceDiscoveryTtl(), this.getServiceDiscoveryTtlTimeUnit(), this.getResponseDecorators(), this.getHttpResponseCreator(), this.getRequestBodyContinuePredicate() ); if (requestContinuePredicate != null) { httpServer.setShouldContinueHttpRequest(requestContinuePredicate); } if (qBitSystemManager != null) { qBitSystemManager.registerServer(httpServer); } return httpServer; }
httpServer.setShouldContinueHttpRequest(this.getRequestContinuePredicate());