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, onClose
close, onReceiveAfterRead, onReceiveBeforeRead, onSendAfterWrite, onSendBeforeWrite, receive, send
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, getUri, receive, send
addRequestHeader, getResponseHeaderNames, getResponseHeaders
public final boolean hasError() throws IOException
WebServiceConnection
hasError
in interface WebServiceConnection
true
if this connection has an error; false
otherwise.IOException
public final String getErrorMessage() throws IOException
WebServiceConnection
getErrorMessage
in interface WebServiceConnection
null
when no error is presentIOException
WebServiceConnection.hasError()
protected final boolean hasResponse() throws IOException
AbstractSenderConnection
hasResponse
in class AbstractSenderConnection
IOException
protected final InputStream getResponseInputStream() throws IOException
AbstractSenderConnection
getResponseInputStream
in class AbstractSenderConnection
IOException
protected abstract int getResponseCode() throws IOException
IOException
protected abstract String getResponseMessage() throws IOException
IOException
protected abstract long getResponseContentLength() throws IOException
IOException
protected abstract InputStream getRawResponseInputStream() throws IOException
IOException
public final boolean hasFault() throws IOException
FaultAwareWebServiceConnection
Typically implemented by looking at an HTTP status code.
hasFault
in interface FaultAwareWebServiceConnection
true
if this connection received a fault; false
otherwise.IOException
- in case of I/O errors@Deprecated public final void setFault(boolean fault)
FaultAwareWebServiceConnection
Typically implemented by setting an HTTP status code.
setFault
in interface FaultAwareWebServiceConnection
fault
- true
if this will send a fault; false
otherwise.public final void setFaultCode(QName faultCode) throws IOException
FaultAwareWebServiceConnection
Typically implemented by setting an HTTP status code.
setFaultCode
in interface FaultAwareWebServiceConnection
faultCode
- the fault code to be set on the connection, or null
for no fault.IOException
- in case of I/O errors