|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.biocomfort.TO.data_consumer.RestMeasurementProcessor
public abstract class RestMeasurementProcessor
The abstract class RestMeasurementProcessor transforms measurement data into a XML string, sends it as POST data to a restful web service and validates the received answer of the server. The data transformation into the XML string and the last part of the URL path to which the transformed data is sent are defined in concrete classes that extend this class.
Constructor Summary | |
---|---|
RestMeasurementProcessor(java.lang.String urlPath,
java.lang.String urlPathPostfix)
Constructs a RestMeasurementProcessor object with
specifying the URL path and the URL path postfix by the given
parameters urlPath and urlPathPostfix. |
Method Summary | |
---|---|
protected java.text.SimpleDateFormat |
getXMLDateFormat()
Returns a SimpleDateFormat that defines the format of dates for the transformation process of measurement data to XML strings, implemented within the method transformDataToXmlString(TO). |
protected static java.lang.String |
getXMLStringFromDocument(org.w3c.dom.Document document)
Returns a String object that represents the XML data and structure of the given document parameter. |
void |
processMeasurementAndWait(MedicalDeviceTO medicalDevice,
TO data)
Transforms the given measurement data into a XML string, sends it as POST data to a restful web service and validates the received answer of the server. |
protected abstract java.lang.String |
transformDataToXmlString(TO data)
Returns a String object that represents the given measurement data, formated as a valid XML document. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RestMeasurementProcessor(java.lang.String urlPath, java.lang.String urlPathPostfix)
RestMeasurementProcessor
object with
specifying the URL path and the URL path postfix by the given
parameters urlPath and urlPathPostfix.
urlPath
- the URL pathurlPathPostfix
- the URL path postfixMethod Detail |
---|
public void processMeasurementAndWait(MedicalDeviceTO medicalDevice, TO data) throws java.lang.Exception
processMeasurementAndWait
in interface MeasurementProcessor
medicalDevice
- the medical device that sends the datadata
- the received measurement data
java.lang.Exception
- if an error occuredprotected abstract java.lang.String transformDataToXmlString(TO data)
data
- the measurement data of a medical device
getXMLDateFormat()
,
getXMLStringFromDocument(Document)
protected java.text.SimpleDateFormat getXMLDateFormat()
transformDataToXmlString(TO)
protected static java.lang.String getXMLStringFromDocument(org.w3c.dom.Document document) throws javax.xml.transform.TransformerException
document
- the document containing the XML data
javax.xml.transform.TransformerException
- if an error occured while transforming
the datatransformDataToXmlString(TO)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |