public abstract class AbstractHttpSenderConnection extends AbstractSenderConnection implements FaultAwareWebServiceConnection
WebServiceConnection implementations that send request over HTTP.| Constructor and Description |
|---|
AbstractHttpSenderConnection() |
| Modifier and Type | Method and Description |
|---|---|
String |
getErrorMessage()
Returns the error message.
|
protected abstract InputStream |
getRawResponseInputStream()
Returns the raw, possibly compressed input stream to read the response from.
|
protected abstract int |
getResponseCode()
Returns the HTTP status code of the response.
|
protected abstract long |
getResponseContentLength()
Returns the length of the response.
|
protected InputStream |
getResponseInputStream()
Returns the input stream to read the response from.
|
protected abstract String |
getResponseMessage()
Returns the HTTP status message of the response.
|
boolean |
hasError()
Indicates whether this connection has an error.
|
boolean |
hasFault()
Indicates whether this connection received a fault.
|
protected boolean |
hasResponse()
Indicates whether this connection has a response.
|
void |
setFault(boolean fault)
Deprecated.
|
void |
setFaultCode(QName faultCode)
Sets a specific fault code.
|
createTransportInputStream, createTransportOutputStream, getRequestOutputStream, onCloseclose, onReceiveAfterRead, onReceiveBeforeRead, onSendAfterWrite, onSendBeforeWrite, receive, sendclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, getUri, receive, sendaddRequestHeader, getResponseHeaderNames, getResponseHeaderspublic final boolean hasError()
throws IOException
WebServiceConnectionhasError in interface WebServiceConnectiontrue if this connection has an error; false otherwise.IOExceptionpublic final String getErrorMessage() throws IOException
WebServiceConnectiongetErrorMessage in interface WebServiceConnectionnull when no error is presentIOExceptionWebServiceConnection.hasError()protected final boolean hasResponse()
throws IOException
AbstractSenderConnectionhasResponse in class AbstractSenderConnectionIOExceptionprotected final InputStream getResponseInputStream() throws IOException
AbstractSenderConnectiongetResponseInputStream in class AbstractSenderConnectionIOExceptionprotected abstract int getResponseCode()
throws IOException
IOExceptionprotected abstract String getResponseMessage() throws IOException
IOExceptionprotected abstract long getResponseContentLength()
throws IOException
IOExceptionprotected abstract InputStream getRawResponseInputStream() throws IOException
IOExceptionpublic final boolean hasFault()
throws IOException
FaultAwareWebServiceConnectionTypically implemented by looking at an HTTP status code.
hasFault in interface FaultAwareWebServiceConnectiontrue if this connection received a fault; false otherwise.IOException - in case of I/O errors@Deprecated public final void setFault(boolean fault)
FaultAwareWebServiceConnectionTypically implemented by setting an HTTP status code.
setFault in interface FaultAwareWebServiceConnectionfault - true if this will send a fault; false otherwise.public final void setFaultCode(QName faultCode) throws IOException
FaultAwareWebServiceConnectionTypically implemented by setting an HTTP status code.
setFaultCode in interface FaultAwareWebServiceConnectionfaultCode - the fault code to be set on the connection, or null for no fault.IOException - in case of I/O errors