Class ResponseQueueManager

java.lang.Object
java.lang.Thread
org.medcare.igtl.network.ResponseQueueManager
All Implemented Interfaces:
Runnable

public class ResponseQueueManager extends Thread
Each OpenIGTClient create its own ResponseQueueManager to queue response they get from server. ResponseQueueManager will perform ResponseHandler added in them queue respecting the order.

User must adapt Capability enum, to be able to send the right capability list and to have a correct error management for incorrect capability request

  • Field Details

  • Constructor Details

    • ResponseQueueManager

      public ResponseQueueManager(ErrorManager errorManager)
      Default ResponseQueueManager constructor.
      Parameters:
      errorManager -
  • Method Details

    • run

      public void run()
      Starts the thread reading responses and adding them to the responseQueue
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
    • addResponse

      public void addResponse(ResponseHandler responseHandler)
      add a new response to the response queue
      Parameters:
      responseHandler - created by OpenIGTClient when receiving a message
    • destroy

      public void destroy()
      stop the thread
    • getSleepTime

      public long getSleepTime()
      ** Gets the current sleep time value return@ The sleep time value
    • setSleepTime

      public void setSleepTime(long sleep)
      Sets the time the listener thread will wait between actions
      Parameters:
      sleep -
    • getVersion

      public String getVersion()
      ** Gets the current version return@ The version value