|
Spring Web Services Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.ws.transport.AbstractWebServiceConnection
org.springframework.ws.transport.AbstractReceiverConnection
org.springframework.ws.transport.http.HttpExchangeConnection
public class HttpExchangeConnection
Implementation of WebServiceConnection that is based on the Java 6 HttpServer HttpExchange.
| Constructor Summary | |
|---|---|
protected |
HttpExchangeConnection(HttpExchange httpExchange)
Constructs a new exchange connection with the given HttpExchange. |
| Method Summary | |
|---|---|
protected void |
addResponseHeader(String name,
String value)
Adds a response header with the given name and value. |
void |
endpointNotFound()
Called when an endpoint is not found. |
String |
getErrorMessage()
Returns the error message. |
HttpExchange |
getHttpExchange()
Returns the HttpExchange for this connection. |
protected Iterator<String> |
getRequestHeaderNames()
Returns an iteration over all the header names this request contains. |
protected Iterator<String> |
getRequestHeaders(String name)
Returns an iteration over all the string values of the specified header. |
protected InputStream |
getRequestInputStream()
Returns the input stream to read the response from. |
protected OutputStream |
getResponseOutputStream()
Returns the output stream to write the request to. |
URI |
getUri()
Returns the URI for this connection. |
boolean |
hasError()
Indicates whether this connection has an error. |
boolean |
hasFault()
Indicates whether this connection received a fault. |
void |
onClose()
Template method invoked from AbstractWebServiceConnection.close(). |
protected void |
onSendAfterWrite(WebServiceMessage message)
Called after the given message has been written to the TransportOutputStream. |
void |
setFault(boolean fault)
Sets whether this connection will send a 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 |
|---|
protected HttpExchangeConnection(HttpExchange httpExchange)
HttpExchange.
| Method Detail |
|---|
public HttpExchange getHttpExchange()
HttpExchange for this connection.
public URI getUri()
throws URISyntaxException
WebServiceConnection
getUri in interface WebServiceConnectionURISyntaxExceptionpublic void endpointNotFound()
EndpointAwareWebServiceConnection
endpointNotFound in interface EndpointAwareWebServiceConnection
public boolean hasError()
throws IOException
WebServiceConnection
hasError in interface WebServiceConnectiontrue if this connection has an error; false otherwise.
IOException
public String getErrorMessage()
throws IOException
WebServiceConnection
getErrorMessage in interface WebServiceConnectionnull when no error is present
IOExceptionWebServiceConnection.hasError()
protected Iterator<String> getRequestHeaderNames()
throws IOException
AbstractReceiverConnectionIterator if
there are no headers.
getRequestHeaderNames in class AbstractReceiverConnectionIOException
protected Iterator<String> getRequestHeaders(String name)
throws IOException
AbstractReceiverConnectionIterator
if there are no headers of the specified name.
getRequestHeaders in class AbstractReceiverConnectionIOException
protected InputStream getRequestInputStream()
throws IOException
AbstractReceiverConnection
getRequestInputStream in class AbstractReceiverConnectionIOException
protected void addResponseHeader(String name,
String value)
throws IOException
AbstractReceiverConnection
addResponseHeader in class AbstractReceiverConnectionname - the name of the headervalue - the value of the header
IOException
protected OutputStream getResponseOutputStream()
throws IOException
AbstractReceiverConnection
getResponseOutputStream in class AbstractReceiverConnectionIOException
protected void onSendAfterWrite(WebServiceMessage message)
throws IOException
AbstractWebServiceConnectionTransportOutputStream. Called from AbstractWebServiceConnection.send(WebServiceMessage).
Default implementation does nothing.
onSendAfterWrite in class AbstractWebServiceConnectionmessage - the message
IOException - when an I/O exception occurs
public void onClose()
throws IOException
AbstractReceiverConnectionAbstractWebServiceConnection.close(). Default implementation is empty.
onClose in class AbstractReceiverConnectionIOException - if an I/O error occurs when closing this connection
public boolean hasFault()
throws IOException
FaultAwareWebServiceConnection
hasFault in interface FaultAwareWebServiceConnectiontrue if this connection received a fault; false otherwise.
IOException - in case of I/O errors
public void setFault(boolean fault)
throws IOException
FaultAwareWebServiceConnection
setFault in interface FaultAwareWebServiceConnectionfault - true if this will send a fault; false otherwise.
IOException - in case of I/O errors
|
Spring Web Services Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||