com.biocomfort.TO.data_consumer
Interface DataConsumerListener


public interface DataConsumerListener

The listener interface for receiving data consumer events and for observing the data processing. The class that is interested in processing a data consumer event implements this interface, and the object created with that class is registered with a DataConsumer object, using the method DataConsumer.addDataConsumerListener. When the data consumer has processed some data successfully or when an error occured while processing it, that object's onSuccess or onError method is invoked, and a description of the medical device thats sends the data and the data itself are passed to it.

See Also:
DataConsumer, DataConsumer.addDataConsumerListener(DataConsumerListener), DataConsumer.removeDataConsumerListener(DataConsumerListener)

Method Summary
 void onError(MedicalDeviceTO medicalDevice, TO data, java.lang.Throwable throwable)
          Invoked when an error occured while processing data by a DataConsumer.
 void onSuccess(MedicalDeviceTO medicalDevice, TO data)
          Invoked when a DataConsumer has processed some data successfully.
 

Method Detail

onSuccess

void onSuccess(MedicalDeviceTO medicalDevice,
               TO data)
Invoked when a DataConsumer has processed some data successfully.

Parameters:
medicalDevice - the medical device that sends the data
data - the data that are processed

onError

void onError(MedicalDeviceTO medicalDevice,
             TO data,
             java.lang.Throwable throwable)
Invoked when an error occured while processing data by a DataConsumer.

Parameters:
medicalDevice - the medical device that sends the data
data - the data that caused the error
throwable - a Throwable that has caused or describes the error