public class XMLHTTPResponseHandler extends AbstractMappingHTTPResponseHandler<Document>
Name | Description | Preconfigured Value | Default Value | Mandatory |
org.fax4j.spi.http.response.data.encoding | The response data encoding, if encoding is not defined, the default system encoding is used. | none | The default system encoding | false |
org.fax4j.spi.http.submit.xml.output.path | The submit XML output path used to locate the fax job ID from the submit fax job response. | none | none | false |
org.fax4j.spi.http.suspend.xml.output.path | The suspend XML output path used to locate the fax job ID from the suspend fax job response. | none | none | false |
org.fax4j.spi.http.resume.xml.output.path | The resume XML output path used to locate the fax job ID from the resume fax job response. | none | none | false |
org.fax4j.spi.http.cancel.xml.output.path | The cancel XML output path used to locate the fax job ID from the cancel fax job response. | none | none | false |
org.fax4j.spi.http.get.status.xml.output.path | The get fax job status XML output path used to locate the fax job status string value from the response. | none | none | false |
org.fax4j.spi.http.xml.pending.status.mappings | The mapping between the output fax status string value to the fax4j FaxJobStatus.PENDING enum value (format is: value1;value2;value3). | none | none | false |
org.fax4j.spi.http.xml.inprogress.status.mappings | The mapping between the output fax status string value to the fax4j FaxJobStatus.IN_PROGRESS enum value (format is: value1;value2;value3). | none | none | false |
org.fax4j.spi.http.xml.error.status.mappings | The mapping between the output fax status string value to the fax4j FaxJobStatus.ERROR enum value (format is: value1;value2;value3). | none | none | false |
org.fax4j.spi.http.xml.error.detection.path | The error detection path. If defined the handler will search for values in the defined path. | none | none | false |
org.fax4j.spi.http.xml.error.detection.value | If detection path and value are defined, the value in the path is searched within the configured value. If value is not defined, all values are considered as errors. | none | none | false |
org.fax4j.spi.http.xml.error.message.path | The path to the error message if errors are detected. If this property is not defined, the value found at org.fax4j.spi.http.xml.error.detection.path will be used instead. | none | none | false |
Modifier and Type | Class and Description |
---|---|
static class |
XMLHTTPResponseHandler.XMLHTTPResponseHandlerConfigurationConstants
This class holds the configuration constants.
|
VALUES_SEPERATOR
RESPONSE_DATA_ENCODING_PROPERTY_KEY
Constructor and Description |
---|
XMLHTTPResponseHandler()
This is the default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected Document |
convertToObject(HTTPResponse httpResponse)
This function converts the HTTP response content to the specific object.
|
protected String |
findValueImpl(Document object,
String path)
This function returns the requested value from the object data.
The path is a set of key names seperated by ';'. |
protected Enum<?> |
getErrorDetectionPathPropertyKey()
Returns the error detection path configuration key.
|
protected Enum<?> |
getErrorDetectionValuePropertyKey()
Returns the error detection value configuration key.
|
protected Enum<?> |
getErrorMessagePathPropertyKey()
Returns the error message path configuration key.
|
protected void |
populateFaxActionType2ReponseDataPathMappings()
This function populates the fax action type to response data path mappings based on the configuration of the
handler.
|
protected void |
populateStatusString2FaxStatusMappings()
This function populates the status strings to fax status enum values based on the configuration of the handler.
|
findError, findValue, findValue, getFaxJobStatus, getFaxJobStatusFromStatusString, getPathToResponseData, initializeImpl, populateFaxActionType2ReponseDataPathMappings, populateStatusString2FaxStatusMappings, updateFaxJob
getResponseDataEncoding
getConfiguration, getConfigurationValue, getConfigurationValue, getLogger, getPropertyPart, getProvider, initialize, setPropertyPart
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setPropertyPart
getProvider
initialize
getConfiguration, getConfigurationValue, getConfigurationValue, getPropertyPart
public XMLHTTPResponseHandler()
protected void populateFaxActionType2ReponseDataPathMappings()
populateFaxActionType2ReponseDataPathMappings
in class AbstractMappingHTTPResponseHandler<Document>
protected void populateStatusString2FaxStatusMappings()
populateStatusString2FaxStatusMappings
in class AbstractMappingHTTPResponseHandler<Document>
protected Enum<?> getErrorDetectionPathPropertyKey()
getErrorDetectionPathPropertyKey
in class AbstractMappingHTTPResponseHandler<Document>
protected Enum<?> getErrorDetectionValuePropertyKey()
getErrorDetectionValuePropertyKey
in class AbstractMappingHTTPResponseHandler<Document>
protected Enum<?> getErrorMessagePathPropertyKey()
getErrorMessagePathPropertyKey
in class AbstractMappingHTTPResponseHandler<Document>
protected String findValueImpl(Document object, String path)
findValueImpl
in class AbstractMappingHTTPResponseHandler<Document>
object
- The object holding all the datapath
- The path to the value (elements seperated by ;)protected Document convertToObject(HTTPResponse httpResponse)
convertToObject
in class AbstractMappingHTTPResponseHandler<Document>
httpResponse
- The HTTP responseCopyright © 2009–2020 fax4j. All rights reserved.