public abstract class AbstractSenderConnection extends AbstractWebServiceConnection
WebServiceConnection implementations used for sending requests.| Constructor and Description |
|---|
AbstractSenderConnection() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
addRequestHeader(String name,
String value)
Adds a request header with the given name and value.
|
protected TransportInputStream |
createTransportInputStream()
Returns a
TransportInputStream. |
protected TransportOutputStream |
createTransportOutputStream()
Returns a
TransportOutputStream for the given message. |
protected abstract OutputStream |
getRequestOutputStream()
Returns the output stream to write the request to.
|
protected abstract Iterator<String> |
getResponseHeaderNames()
Returns an iteration over all the header names this request contains.
|
protected abstract Iterator<String> |
getResponseHeaders(String name)
Returns an iteration over all the string values of the specified header.
|
protected abstract InputStream |
getResponseInputStream()
Returns the input stream to read the response from.
|
protected abstract boolean |
hasResponse()
Indicates whether this connection has a response.
|
protected void |
onClose()
Template method invoked from
AbstractWebServiceConnection.close(). |
close, onReceiveAfterRead, onReceiveBeforeRead, onSendAfterWrite, onSendBeforeWrite, receive, sendclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetErrorMessage, getUri, hasErrorprotected final TransportOutputStream createTransportOutputStream() throws IOException
AbstractWebServiceConnectionTransportOutputStream for the given message. Called from AbstractWebServiceConnection.send(WebServiceMessage).createTransportOutputStream in class AbstractWebServiceConnectionIOException - when an I/O exception occursprotected final TransportInputStream createTransportInputStream() throws IOException
AbstractWebServiceConnectionTransportInputStream. Called from AbstractWebServiceConnection.receive(WebServiceMessageFactory).createTransportInputStream in class AbstractWebServiceConnectionnull if no response can be readIOException - when an I/O exception occursprotected void onClose()
throws IOException
AbstractWebServiceConnection.close(). Default implementation is empty.onClose in class AbstractWebServiceConnectionIOException - if an I/O error occurs when closing this connectionprotected abstract boolean hasResponse()
throws IOException
IOExceptionprotected abstract void addRequestHeader(String name, String value) throws IOException
name - the name of the headervalue - the value of the headerIOExceptionprotected abstract OutputStream getRequestOutputStream() throws IOException
IOExceptionprotected abstract Iterator<String> getResponseHeaderNames() throws IOException
Iterator if
there are no headers.IOExceptionprotected abstract Iterator<String> getResponseHeaders(String name) throws IOException
Iterator
if there are no headers of the specified name.IOExceptionprotected abstract InputStream getResponseInputStream() throws IOException
IOException