Class HttpExchangeConnection
java.lang.Object
org.springframework.ws.transport.AbstractWebServiceConnection
org.springframework.ws.transport.AbstractReceiverConnection
org.springframework.ws.transport.http.HttpExchangeConnection
- All Implemented Interfaces:
AutoCloseable,org.springframework.ws.transport.EndpointAwareWebServiceConnection,org.springframework.ws.transport.FaultAwareWebServiceConnection,org.springframework.ws.transport.HeadersAwareReceiverWebServiceConnection,org.springframework.ws.transport.WebServiceConnection
public class HttpExchangeConnection
extends org.springframework.ws.transport.AbstractReceiverConnection
implements org.springframework.ws.transport.EndpointAwareWebServiceConnection, org.springframework.ws.transport.FaultAwareWebServiceConnection
Implementation of
WebServiceConnection that is based on the Java 6 HttpServer HttpExchange.- Since:
- 1.5.0
- Author:
- Arjen Poutsma, Greg Turnquist
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHttpExchangeConnection(com.sun.net.httpserver.HttpExchange httpExchange) Constructs a new exchange connection with the givenHttpExchange. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddResponseHeader(String name, String value) voidcom.sun.net.httpserver.HttpExchangeReturns theHttpExchangefor this connection.getRequestHeaders(String name) protected InputStreamprotected OutputStreamgetUri()booleanhasError()booleanhasFault()voidonClose()protected voidonSendAfterWrite(org.springframework.ws.WebServiceMessage message) voidsetFault(boolean fault) Deprecated.voidsetFaultCode(QName faultCode) Methods inherited from class org.springframework.ws.transport.AbstractReceiverConnection
createTransportInputStream, createTransportOutputStreamMethods inherited from class org.springframework.ws.transport.AbstractWebServiceConnection
close, onReceiveAfterRead, onReceiveBeforeRead, onSendBeforeWrite, receive, sendMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.ws.transport.WebServiceConnection
close, receive, send
-
Constructor Details
-
HttpExchangeConnection
protected HttpExchangeConnection(com.sun.net.httpserver.HttpExchange httpExchange) Constructs a new exchange connection with the givenHttpExchange.
-
-
Method Details
-
getHttpExchange
public com.sun.net.httpserver.HttpExchange getHttpExchange()Returns theHttpExchangefor this connection. -
getUri
- Specified by:
getUriin interfaceorg.springframework.ws.transport.WebServiceConnection- Throws:
URISyntaxException
-
endpointNotFound
public void endpointNotFound()- Specified by:
endpointNotFoundin interfaceorg.springframework.ws.transport.EndpointAwareWebServiceConnection
-
hasError
- Specified by:
hasErrorin interfaceorg.springframework.ws.transport.WebServiceConnection- Throws:
IOException
-
getErrorMessage
- Specified by:
getErrorMessagein interfaceorg.springframework.ws.transport.WebServiceConnection- Throws:
IOException
-
getRequestHeaderNames
- Specified by:
getRequestHeaderNamesin interfaceorg.springframework.ws.transport.HeadersAwareReceiverWebServiceConnection- Throws:
IOException
-
getRequestHeaders
- Specified by:
getRequestHeadersin interfaceorg.springframework.ws.transport.HeadersAwareReceiverWebServiceConnection- Throws:
IOException
-
getRequestInputStream
- Specified by:
getRequestInputStreamin classorg.springframework.ws.transport.AbstractReceiverConnection- Throws:
IOException
-
addResponseHeader
- Specified by:
addResponseHeaderin interfaceorg.springframework.ws.transport.HeadersAwareReceiverWebServiceConnection- Throws:
IOException
-
getResponseOutputStream
- Specified by:
getResponseOutputStreamin classorg.springframework.ws.transport.AbstractReceiverConnection- Throws:
IOException
-
onSendAfterWrite
protected void onSendAfterWrite(org.springframework.ws.WebServiceMessage message) throws IOException - Overrides:
onSendAfterWritein classorg.springframework.ws.transport.AbstractWebServiceConnection- Throws:
IOException
-
onClose
- Overrides:
onClosein classorg.springframework.ws.transport.AbstractReceiverConnection- Throws:
IOException
-
hasFault
- Specified by:
hasFaultin interfaceorg.springframework.ws.transport.FaultAwareWebServiceConnection- Throws:
IOException
-
setFault
Deprecated.- Specified by:
setFaultin interfaceorg.springframework.ws.transport.FaultAwareWebServiceConnection- Throws:
IOException
-
setFaultCode
- Specified by:
setFaultCodein interfaceorg.springframework.ws.transport.FaultAwareWebServiceConnection- Throws:
IOException
-