Interface QueueRunnable<Server extends QueueServer>


public interface QueueRunnable<Server extends QueueServer>
Interface for executing some code on a server queue. When processed, a thread is started and the interactWith method is called first, with a queue server as its argument. After the queue server is released, the run method is executed to allow for any necessary processing after the server is done. In both cases, the methods are called from the newly running thread.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Interact with a queue server.
    void
    run()
    The method to call after interactWith returns.
  • Method Details

    • interactWith

      void interactWith(Server server)
      Interact with a queue server. This method is called when this object is at the head of a server queue and ready to be processed by a queue server.
      Parameters:
      server - the server handling this QueueCallable
    • run

      void run()
      The method to call after interactWith returns. Users will implement this method so that blocks of code can be executed after a queue server finishes its processing.