Java Code Examples for javax.xml.ws.spi.http.HttpExchange#close()
The following examples show how to use
javax.xml.ws.spi.http.HttpExchange#close() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PortableHttpHandler.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public void handleExchange(HttpExchange msg) throws IOException { WSHTTPConnection con = new PortableConnectionImpl(adapter,msg); try { if (logger.isLoggable(Level.FINE)) { logger.log(Level.FINE, "Received HTTP request:{0}", msg.getRequestURI()); } String method = msg.getRequestMethod(); if(method.equals(GET_METHOD) || method.equals(POST_METHOD) || method.equals(HEAD_METHOD) || method.equals(PUT_METHOD) || method.equals(DELETE_METHOD)) { adapter.handle(con); } else { logger.warning(HttpserverMessages.UNEXPECTED_HTTP_METHOD(method)); } } finally { msg.close(); } }
Example 2
Source File: PortableHttpHandler.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public void handleExchange(HttpExchange msg) throws IOException { WSHTTPConnection con = new PortableConnectionImpl(adapter,msg); try { if (logger.isLoggable(Level.FINE)) { logger.log(Level.FINE, "Received HTTP request:{0}", msg.getRequestURI()); } String method = msg.getRequestMethod(); if(method.equals(GET_METHOD) || method.equals(POST_METHOD) || method.equals(HEAD_METHOD) || method.equals(PUT_METHOD) || method.equals(DELETE_METHOD)) { adapter.handle(con); } else { logger.warning(HttpserverMessages.UNEXPECTED_HTTP_METHOD(method)); } } finally { msg.close(); } }
Example 3
Source File: PortableHttpHandler.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public void handleExchange(HttpExchange msg) throws IOException { WSHTTPConnection con = new PortableConnectionImpl(adapter,msg); try { if (logger.isLoggable(Level.FINE)) { logger.log(Level.FINE, "Received HTTP request:{0}", msg.getRequestURI()); } String method = msg.getRequestMethod(); if(method.equals(GET_METHOD) || method.equals(POST_METHOD) || method.equals(HEAD_METHOD) || method.equals(PUT_METHOD) || method.equals(DELETE_METHOD)) { adapter.handle(con); } else { logger.warning(HttpserverMessages.UNEXPECTED_HTTP_METHOD(method)); } } finally { msg.close(); } }
Example 4
Source File: PortableHttpHandler.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public void handleExchange(HttpExchange msg) throws IOException { WSHTTPConnection con = new PortableConnectionImpl(adapter,msg); try { if (logger.isLoggable(Level.FINE)) { logger.log(Level.FINE, "Received HTTP request:{0}", msg.getRequestURI()); } String method = msg.getRequestMethod(); if(method.equals(GET_METHOD) || method.equals(POST_METHOD) || method.equals(HEAD_METHOD) || method.equals(PUT_METHOD) || method.equals(DELETE_METHOD)) { adapter.handle(con); } else { logger.warning(HttpserverMessages.UNEXPECTED_HTTP_METHOD(method)); } } finally { msg.close(); } }
Example 5
Source File: PortableHttpHandler.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
public void handleExchange(HttpExchange msg) throws IOException { WSHTTPConnection con = new PortableConnectionImpl(adapter,msg); try { if (logger.isLoggable(Level.FINE)) { logger.log(Level.FINE, "Received HTTP request:{0}", msg.getRequestURI()); } String method = msg.getRequestMethod(); if(method.equals(GET_METHOD) || method.equals(POST_METHOD) || method.equals(HEAD_METHOD) || method.equals(PUT_METHOD) || method.equals(DELETE_METHOD)) { adapter.handle(con); } else { logger.warning(HttpserverMessages.UNEXPECTED_HTTP_METHOD(method)); } } finally { msg.close(); } }
Example 6
Source File: PortableHttpHandler.java From hottub with GNU General Public License v2.0 | 6 votes |
public void handleExchange(HttpExchange msg) throws IOException { WSHTTPConnection con = new PortableConnectionImpl(adapter,msg); try { if (logger.isLoggable(Level.FINE)) { logger.log(Level.FINE, "Received HTTP request:{0}", msg.getRequestURI()); } String method = msg.getRequestMethod(); if(method.equals(GET_METHOD) || method.equals(POST_METHOD) || method.equals(HEAD_METHOD) || method.equals(PUT_METHOD) || method.equals(DELETE_METHOD)) { adapter.handle(con); } else { logger.warning(HttpserverMessages.UNEXPECTED_HTTP_METHOD(method)); } } finally { msg.close(); } }
Example 7
Source File: PortableHttpHandler.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public void handleExchange(HttpExchange msg) throws IOException { WSHTTPConnection con = new PortableConnectionImpl(adapter,msg); try { if (logger.isLoggable(Level.FINE)) { logger.log(Level.FINE, "Received HTTP request:{0}", msg.getRequestURI()); } String method = msg.getRequestMethod(); if(method.equals(GET_METHOD) || method.equals(POST_METHOD) || method.equals(HEAD_METHOD) || method.equals(PUT_METHOD) || method.equals(DELETE_METHOD)) { adapter.handle(con); } else { logger.warning(HttpserverMessages.UNEXPECTED_HTTP_METHOD(method)); } } finally { msg.close(); } }
Example 8
Source File: PortableHttpHandler.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public void handleExchange(HttpExchange msg) throws IOException { WSHTTPConnection con = new PortableConnectionImpl(adapter,msg); try { if (logger.isLoggable(Level.FINE)) { logger.log(Level.FINE, "Received HTTP request:{0}", msg.getRequestURI()); } String method = msg.getRequestMethod(); if(method.equals(GET_METHOD) || method.equals(POST_METHOD) || method.equals(HEAD_METHOD) || method.equals(PUT_METHOD) || method.equals(DELETE_METHOD)) { adapter.handle(con); } else { logger.warning(HttpserverMessages.UNEXPECTED_HTTP_METHOD(method)); } } finally { msg.close(); } }
Example 9
Source File: HttpHandlerImpl.java From cxf with Apache License 2.0 | 5 votes |
@Override public void handle(HttpExchange exchange) throws IOException { try { //Update address in EndpointInfo; this can only happen here, //as the contextPath is provided in the HttpExchange only EndpointInfo ei = destination.getEndpointInfo(); if (ei != null) { String ad = ei.getAddress(); String path = exchange.getHttpContext().getPath(); if (ad != null && ad.equals(path)) { synchronized (ei) { String contextPath = exchange.getContextPath(); ei.setAddress(contextPath + path); if (ei.getExtensor(AddressType.class) != null) { ei.getExtensor(AddressType.class).setLocation(contextPath + path); } else if (ei.getExtensor(SoapAddress.class) != null) { ei.getExtensor(SoapAddress.class).setLocationURI(contextPath + path); } } } } //service request destination.doService(new HttpServletRequestAdapter(exchange), new HttpServletResponseAdapter(exchange)); } finally { exchange.close(); } }