Interface JobWorker

  • All Superinterfaces:
    AutoCloseable
    All Known Implementing Classes:
    JobWorkerImpl

    public interface JobWorker
    extends AutoCloseable
    Represents an active job worker that perfors jobs of a certain type. While a registration is open, the client continuously receives jobs from the broker and hands them to a registered JobHandler.
    • Method Detail

      • isOpen

        boolean isOpen()
        Returns:
        true if this registration is currently active and work items are being received for it
      • isClosed

        boolean isClosed()
        Returns:
        true if this registration is not open and is not in the process of opening or closing
      • close

        void close()
        Closes this registration and stops receiving new work items. Blocks until all previously received items have been handed to the worker.
        Specified by:
        close in interface AutoCloseable