|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.biocomfort.TO.data_consumer.DataConsumer
public abstract class DataConsumer
With the abstract class DataConsumer it is possible to define custom data processing functionality. Simply extend this class and add it as SDKDataListener to the a object of a SDK implementation by calling the method SDK.addSDKDataListener(SDKDataListener).
SDK.addSDKDataListener(SDKDataListener)
Constructor Summary | |
---|---|
DataConsumer()
Constructs a DataConsumer object with initializing it so
that it is enabled. |
Method Summary | |
---|---|
void |
addDataConsumerListener(DataConsumerListener listener)
Adds the specified data consumer listener to receive data consumer events. |
protected void |
fireOnErrorEvent(MedicalDeviceTO medicalDevice,
TO data,
java.lang.Throwable throwable)
Invokes an onError event for all data consumer listeners that are registers with this DataConsumer object. |
protected void |
fireOnSuccessEvent(MedicalDeviceTO medicalDevice,
TO data)
Invokes an onSuccess event for all data consumer listeners that are registers with this DataConsumer object. |
boolean |
isEnabled()
Returns true if this DataConsumer object is enabled, false otherwise. |
void |
onDataReceived(MedicalDeviceTO medicalDevice,
TO data)
If this DataConsumer object was registered as SDKDataListener with the SDK implementation by calling the method SDK.addSDKDataListener this method is invoked when the SDK receives measurement data from a medical device. |
protected abstract void |
processData(MedicalDeviceTO medicalDevice,
TO data)
If this DataConsumer object was registered as SDKDataListener with the SDK implementation by calling the method SDK.addSDKDataListener and if this data consumer is enabled this method is invoked. |
void |
removeDataConsumerListener(DataConsumerListener listener)
Removes the specified data consumer listener so that it no longer receives data consumer events. |
void |
setEnabled(boolean enabled)
Enables or disables this DataConsumer object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DataConsumer()
DataConsumer
object with initializing it so
that it is enabled.
SDK.addSDKDataListener(SDKDataListener)
Method Detail |
---|
public void addDataConsumerListener(DataConsumerListener listener)
listener
- the data consumer listenerpublic void removeDataConsumerListener(DataConsumerListener listener)
listener
- the data consumer listener to removepublic boolean isEnabled()
public void setEnabled(boolean enabled)
enabled
- true enables this data consumerpublic void onDataReceived(MedicalDeviceTO medicalDevice, TO data)
onDataReceived
in interface SDKDataListener
medicalDevice
- the medical device that sends the datadata
- the received measurement dataSDK.addSDKDataListener(SDKDataListener)
,
processData(MedicalDeviceTO, TO)
protected void fireOnSuccessEvent(MedicalDeviceTO medicalDevice, TO data)
medicalDevice
- the medical device that sends the datadata
- the received measurement dataprotected void fireOnErrorEvent(MedicalDeviceTO medicalDevice, TO data, java.lang.Throwable throwable)
medicalDevice
- the medical device that sends the datadata
- the received measurement datathrowable
- a Throwable that has caused or
describes the errorprotected abstract void processData(MedicalDeviceTO medicalDevice, TO data)
medicalDevice
- the medical device that sends the datadata
- the received measurement data
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |