|
Spring Web Services Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 WebServiceConnection
URISyntaxException
public void endpointNotFound()
EndpointAwareWebServiceConnection
endpointNotFound
in interface EndpointAwareWebServiceConnection
public boolean hasError() throws IOException
WebServiceConnection
hasError
in interface WebServiceConnection
true
if this connection has an error; false
otherwise.
IOException
public String getErrorMessage() throws IOException
WebServiceConnection
getErrorMessage
in interface WebServiceConnection
null
when no error is present
IOException
WebServiceConnection.hasError()
protected Iterator<String> getRequestHeaderNames() throws IOException
AbstractReceiverConnection
Iterator
if
there are no headers.
getRequestHeaderNames
in class AbstractReceiverConnection
IOException
protected Iterator<String> getRequestHeaders(String name) throws IOException
AbstractReceiverConnection
Iterator
if there are no headers of the specified name.
getRequestHeaders
in class AbstractReceiverConnection
IOException
protected InputStream getRequestInputStream() throws IOException
AbstractReceiverConnection
getRequestInputStream
in class AbstractReceiverConnection
IOException
protected void addResponseHeader(String name, String value) throws IOException
AbstractReceiverConnection
addResponseHeader
in class AbstractReceiverConnection
name
- the name of the headervalue
- the value of the header
IOException
protected OutputStream getResponseOutputStream() throws IOException
AbstractReceiverConnection
getResponseOutputStream
in class AbstractReceiverConnection
IOException
protected void onSendAfterWrite(WebServiceMessage message) throws IOException
AbstractWebServiceConnection
TransportOutputStream
. Called from AbstractWebServiceConnection.send(WebServiceMessage)
.
Default implementation does nothing.
onSendAfterWrite
in class AbstractWebServiceConnection
message
- the message
IOException
- when an I/O exception occurspublic void onClose() throws IOException
AbstractReceiverConnection
AbstractWebServiceConnection.close()
. Default implementation is empty.
onClose
in class AbstractReceiverConnection
IOException
- if an I/O error occurs when closing this connectionpublic boolean hasFault() throws IOException
FaultAwareWebServiceConnection
hasFault
in interface FaultAwareWebServiceConnection
true
if this connection received a fault; false
otherwise.
IOException
- in case of I/O errorspublic void setFault(boolean fault) throws IOException
FaultAwareWebServiceConnection
setFault
in interface FaultAwareWebServiceConnection
fault
- 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 |