/** * Build the HttpContext for the given endpoint. * @param endpoint the JAX-WS Provider Endpoint object * @param serviceName the given service name * @return the fully populated HttpContext */ protected HttpContext buildHttpContext(Endpoint endpoint, String serviceName) { Assert.state(this.server != null, "No HttpServer available"); String fullPath = calculateEndpointPath(endpoint, serviceName); HttpContext httpContext = this.server.createContext(fullPath); if (this.filters != null) { httpContext.getFilters().addAll(this.filters); } if (this.authenticator != null) { httpContext.setAuthenticator(this.authenticator); } return httpContext; }
@Override public void afterPropertiesSet() throws IOException { InetSocketAddress address = (this.hostname != null ? new InetSocketAddress(this.hostname, this.port) : new InetSocketAddress(this.port)); this.server = HttpServer.create(address, this.backlog); if (this.executor != null) { this.server.setExecutor(this.executor); } if (this.contexts != null) { this.contexts.forEach((key, context) -> { HttpContext httpContext = this.server.createContext(key, context); if (this.filters != null) { httpContext.getFilters().addAll(this.filters); } if (this.authenticator != null) { httpContext.setAuthenticator(this.authenticator); } }); } if (logger.isInfoEnabled()) { logger.info("Starting HttpServer at address " + address); } this.server.start(); }
/** * Build the HttpContext for the given endpoint. * @param endpoint the JAX-WS Provider Endpoint object * @param serviceName the given service name * @return the fully populated HttpContext */ protected HttpContext buildHttpContext(Endpoint endpoint, String serviceName) { Assert.state(this.server != null, "No HttpServer available"); String fullPath = calculateEndpointPath(endpoint, serviceName); HttpContext httpContext = this.server.createContext(fullPath); if (this.filters != null) { httpContext.getFilters().addAll(this.filters); } if (this.authenticator != null) { httpContext.setAuthenticator(this.authenticator); } return httpContext; }
@Override public void afterPropertiesSet() throws IOException { InetSocketAddress address = (this.hostname != null ? new InetSocketAddress(this.hostname, this.port) : new InetSocketAddress(this.port)); this.server = HttpServer.create(address, this.backlog); if (this.executor != null) { this.server.setExecutor(this.executor); } if (this.contexts != null) { this.contexts.forEach((key, context) -> { HttpContext httpContext = this.server.createContext(key, context); if (this.filters != null) { httpContext.getFilters().addAll(this.filters); } if (this.authenticator != null) { httpContext.setAuthenticator(this.authenticator); } }); } if (logger.isInfoEnabled()) { logger.info("Starting HttpServer at address " + address); } this.server.start(); }
public HttpContext bind(HttpServer server) { handler = new ResteasyHttpHandler(); boundContext = server.createContext(path, handler); HttpContextResteasyConfiguration config = new HttpContextResteasyConfiguration(boundContext); deployment.getDefaultContextObjects().put(ResteasyConfiguration.class, config); if (securityDomain != null) { boundContext.getFilters().add(new BasicAuthFilter(securityDomain)); } deployment.start(); handler.setDispatcher(deployment.getDispatcher()); handler.setProviderFactory(deployment.getProviderFactory()); return boundContext; }
protected void initHttpContext(HttpContext context) { context.getFilters().addAll(httpServerFilters); if (httpServerAuthenticator != null) context.setAuthenticator(httpServerAuthenticator); }
/** * Build the HttpContext for the given endpoint. * @param endpoint the JAX-WS Provider Endpoint object * @param serviceName the given service name * @return the fully populated HttpContext */ protected HttpContext buildHttpContext(Endpoint endpoint, String serviceName) { Assert.state(this.server != null, "No HttpServer available"); String fullPath = calculateEndpointPath(endpoint, serviceName); HttpContext httpContext = this.server.createContext(fullPath); if (this.filters != null) { httpContext.getFilters().addAll(this.filters); } if (this.authenticator != null) { httpContext.setAuthenticator(this.authenticator); } return httpContext; }
/** * Build the HttpContext for the given endpoint. * @param endpoint the JAX-WS Provider Endpoint object * @param serviceName the given service name * @return the fully populated HttpContext */ protected HttpContext buildHttpContext(Endpoint endpoint, String serviceName) { Assert.state(this.server != null, "No HttpServer available"); String fullPath = calculateEndpointPath(endpoint, serviceName); HttpContext httpContext = this.server.createContext(fullPath); if (this.filters != null) { httpContext.getFilters().addAll(this.filters); } if (this.authenticator != null) { httpContext.setAuthenticator(this.authenticator); } return httpContext; }
@Override public void afterPropertiesSet() throws IOException { InetSocketAddress address = (this.hostname != null ? new InetSocketAddress(this.hostname, this.port) : new InetSocketAddress(this.port)); this.server = HttpServer.create(address, this.backlog); if (this.executor != null) { this.server.setExecutor(this.executor); } if (this.contexts != null) { this.contexts.forEach((key, context) -> { HttpContext httpContext = this.server.createContext(key, context); if (this.filters != null) { httpContext.getFilters().addAll(this.filters); } if (this.authenticator != null) { httpContext.setAuthenticator(this.authenticator); } }); } if (logger.isInfoEnabled()) { logger.info("Starting HttpServer at address " + address); } this.server.start(); }
HttpContext c2d = httpServer.createContext("/mil-sym-service/renderer/mp2d/", new MultiPointHandler(true)); c3d.getFilters().add(new ParameterFilter()); c2d.getFilters().add(new ParameterFilter()); httpServer.setExecutor(Executors.newCachedThreadPool()); } catch(BindException bexc){
HttpContext c2d = httpServer.createContext("/mil-sym-service/renderer/mp2d/", new MultiPointHandler(true)); c3d.getFilters().add(new ParameterFilter()); c2d.getFilters().add(new ParameterFilter()); httpServer.setExecutor(Executors.newCachedThreadPool()); } catch(BindException bexc){