org.springframework.ws.transport.http
Class HttpExchangeConnection

java.lang.Object
  extended by org.springframework.ws.transport.AbstractWebServiceConnection
      extended by org.springframework.ws.transport.AbstractReceiverConnection
          extended by org.springframework.ws.transport.http.HttpExchangeConnection
All Implemented Interfaces:
EndpointAwareWebServiceConnection, FaultAwareWebServiceConnection, WebServiceConnection

public class HttpExchangeConnection
extends AbstractReceiverConnection
implements EndpointAwareWebServiceConnection, FaultAwareWebServiceConnection

Implementation of WebServiceConnection that is based on the Java 6 HttpServer HttpExchange.

Since:
1.5.0
Author:
Arjen Poutsma

Constructor Summary
protected HttpExchangeConnection(com.sun.net.httpserver.HttpExchange httpExchange)
          Constructs a new exchange connection with the given HttpExchange.
 
Method Summary
protected  void addResponseHeader(String name, String value)
           
 void endpointNotFound()
           
 String getErrorMessage()
           
 com.sun.net.httpserver.HttpExchange getHttpExchange()
          Returns the HttpExchange for this connection.
protected  Iterator<String> getRequestHeaderNames()
           
protected  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)
           
 
Methods inherited from class org.springframework.ws.transport.AbstractReceiverConnection
createTransportInputStream, createTransportOutputStream
 
Methods inherited from class org.springframework.ws.transport.AbstractWebServiceConnection
close, onReceiveAfterRead, onReceiveBeforeRead, onSendBeforeWrite, receive, send
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.ws.transport.WebServiceConnection
close, receive, send
 

Constructor Detail

HttpExchangeConnection

protected HttpExchangeConnection(com.sun.net.httpserver.HttpExchange httpExchange)
Constructs a new exchange connection with the given HttpExchange.

Method Detail

getHttpExchange

public com.sun.net.httpserver.HttpExchange getHttpExchange()
Returns the HttpExchange for this connection.


getUri

public URI getUri()
           throws URISyntaxException
Specified by:
getUri in interface WebServiceConnection
Throws:
URISyntaxException

endpointNotFound

public void endpointNotFound()
Specified by:
endpointNotFound in interface EndpointAwareWebServiceConnection

hasError

public boolean hasError()
                 throws IOException
Specified by:
hasError in interface WebServiceConnection
Throws:
IOException

getErrorMessage

public String getErrorMessage()
                       throws IOException
Specified by:
getErrorMessage in interface WebServiceConnection
Throws:
IOException

getRequestHeaderNames

protected Iterator<String> getRequestHeaderNames()
                                          throws IOException
Specified by:
getRequestHeaderNames in class AbstractReceiverConnection
Throws:
IOException

getRequestHeaders

protected Iterator<String> getRequestHeaders(String name)
                                      throws IOException
Specified by:
getRequestHeaders in class AbstractReceiverConnection
Throws:
IOException

getRequestInputStream

protected InputStream getRequestInputStream()
                                     throws IOException
Specified by:
getRequestInputStream in class AbstractReceiverConnection
Throws:
IOException

addResponseHeader

protected void addResponseHeader(String name,
                                 String value)
                          throws IOException
Specified by:
addResponseHeader in class AbstractReceiverConnection
Throws:
IOException

getResponseOutputStream

protected OutputStream getResponseOutputStream()
                                        throws IOException
Specified by:
getResponseOutputStream in class AbstractReceiverConnection
Throws:
IOException

onSendAfterWrite

protected void onSendAfterWrite(WebServiceMessage message)
                         throws IOException
Overrides:
onSendAfterWrite in class AbstractWebServiceConnection
Throws:
IOException

onClose

public void onClose()
             throws IOException
Overrides:
onClose in class AbstractReceiverConnection
Throws:
IOException

hasFault

public boolean hasFault()
                 throws IOException
Specified by:
hasFault in interface FaultAwareWebServiceConnection
Throws:
IOException

setFault

public void setFault(boolean fault)
              throws IOException
Specified by:
setFault in interface FaultAwareWebServiceConnection
Throws:
IOException


Copyright © 2013 The Spring Web Services Framework. All Rights Reserved.