Interface DataReceiver

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
DataReceiverImpl

public interface DataReceiver extends Closeable
An interface for a class that receives data and offers methods to close the receiving when it is finished and to check the receiver for errors that might have been encountered.
Author:
Michael Röder (roeder@informatik.uni-leipzig.de)
  • Method Details

    • getErrorCount

      int getErrorCount()
      Returns the number of errors that have been encountered while receiving data. If this number is not 0 the receiver can not guarantee that all data has been received correctly.
      Returns:
      the number of errors encountered during the receiving of data
    • closeWhenFinished

      void closeWhenFinished()
      This method waits for the DataReceiver to finish its work and closes the incoming queue as well as the internal thread pool after that. For making sure that all data is received this method should be preferred compared to the Closeable.close() method which might close the receiver in a rude way.
    • increaseErrorCount

      void increaseErrorCount()
    • getDataHandler

      DataHandler getDataHandler()
    • getQueue

      RabbitQueue getQueue()