public class HttpExchangeConnection extends AbstractReceiverConnection implements EndpointAwareWebServiceConnection, FaultAwareWebServiceConnection
WebServiceConnection that is based on the Java 6 HttpServer HttpExchange.| Modifier | Constructor and Description |
|---|---|
protected |
HttpExchangeConnection(com.sun.net.httpserver.HttpExchange httpExchange)
Constructs a new exchange connection with the given
HttpExchange. |
| Modifier and Type | Method and Description |
|---|---|
void |
addResponseHeader(String name,
String value) |
void |
endpointNotFound() |
String |
getErrorMessage() |
com.sun.net.httpserver.HttpExchange |
getHttpExchange()
Returns the
HttpExchange for this connection. |
Iterator<String> |
getRequestHeaderNames() |
Iterator<String> |
getRequestHeaders(String name) |
protected InputStream |
getRequestInputStream() |
protected OutputStream |
getResponseOutputStream() |
URI |
getUri() |
boolean |
hasError() |
boolean |
hasFault() |
void |
onClose() |
protected void |
onSendAfterWrite(WebServiceMessage message) |
void |
setFault(boolean fault)
Deprecated.
|
void |
setFaultCode(QName faultCode) |
createTransportInputStream, createTransportOutputStreamclose, onReceiveAfterRead, onReceiveBeforeRead, onSendBeforeWrite, receive, sendclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, receive, sendprotected HttpExchangeConnection(com.sun.net.httpserver.HttpExchange httpExchange)
HttpExchange.public com.sun.net.httpserver.HttpExchange getHttpExchange()
HttpExchange for this connection.public URI getUri() throws URISyntaxException
getUri in interface WebServiceConnectionURISyntaxExceptionpublic void endpointNotFound()
endpointNotFound in interface EndpointAwareWebServiceConnectionpublic boolean hasError()
throws IOException
hasError in interface WebServiceConnectionIOExceptionpublic String getErrorMessage() throws IOException
getErrorMessage in interface WebServiceConnectionIOExceptionpublic Iterator<String> getRequestHeaderNames() throws IOException
getRequestHeaderNames in interface HeadersAwareReceiverWebServiceConnectionIOExceptionpublic Iterator<String> getRequestHeaders(String name) throws IOException
getRequestHeaders in interface HeadersAwareReceiverWebServiceConnectionIOExceptionprotected InputStream getRequestInputStream() throws IOException
getRequestInputStream in class AbstractReceiverConnectionIOExceptionpublic void addResponseHeader(String name, String value) throws IOException
addResponseHeader in interface HeadersAwareReceiverWebServiceConnectionIOExceptionprotected OutputStream getResponseOutputStream() throws IOException
getResponseOutputStream in class AbstractReceiverConnectionIOExceptionprotected void onSendAfterWrite(WebServiceMessage message) throws IOException
onSendAfterWrite in class AbstractWebServiceConnectionIOExceptionpublic void onClose()
throws IOException
onClose in class AbstractReceiverConnectionIOExceptionpublic boolean hasFault()
throws IOException
hasFault in interface FaultAwareWebServiceConnectionIOException@Deprecated public void setFault(boolean fault) throws IOException
setFault in interface FaultAwareWebServiceConnectionIOExceptionpublic void setFaultCode(QName faultCode) throws IOException
setFaultCode in interface FaultAwareWebServiceConnectionIOExceptionCopyright © 2022 Pivotal Software. All rights reserved.