public void setHttpServer(HttpServer httpServer) {
Objects.requireNonNull(httpServer);
if (this.httpServer.isDone())
public void setHttpServer(HttpServer httpServer) {
Objects.requireNonNull(httpServer);
if (this.httpServer.isDone())
// create contexts whose handlers had already been published
synchronized (httpHandlers) {
synchronized (httpAuthenticators) {
// create contexts whose handlers had already been published
synchronized (httpHandlers) {
synchronized (httpAuthenticators) {
// we want to set the authenticator BEFORE the handler actually becomes active
httpContext.setAuthenticator(authenticator);
httpContext.setHandler(httpHandler);
// we want to set the authenticator BEFORE the handler actually becomes active
httpContext.setAuthenticator(authenticator);
httpContext.setHandler(httpHandler);