Class QueueJob

  • All Implemented Interfaces:
    Comparable<QueueJob>

    @ExportedBean
    public class QueueJob
    extends Object
    implements Comparable<QueueJob>
    Stores attributes and functions of a queue job. Implements the interface Comparable for sorting the jobs currently waiting in the queue according to their wait time.
    Author:
    yboev
    • Constructor Detail

      • QueueJob

        public QueueJob​(Queue.BuildableItem item,
                        long currentTime)
        Constructor.
        Parameters:
        item - the job(item) waiting in the queue
        currentTime - the current time on which all items have been retrieved
    • Method Detail

      • getApi

        public Api getApi()
        REST API
        Returns:
        the api.
      • getStatus

        @Exported
        public String getStatus()
        Returns the status of this queue job. Options: "ok", "blocked", "stuck"
        Returns:
        the status
      • getName

        @Exported
        public String getName()
        Returns ID of the waiting job.
        Returns:
        the ID
      • getTime

        @Exported
        public String getTime()
        Color Returns the time which a job has spend in the queue waiting as a formate String.
        Returns:
        the formated String
      • getCauseOfBlockage

        @Exported
        public String getCauseOfBlockage()
        Returns why the job is waiting in the queue.
      • getColor

        @Exported
        public String getColor()
        Color to be used for this job.
        Returns:
        the color as String
      • getIcon

        @Exported
        public String getIcon()
        Returns the icon for this queue job.
        Returns:
        address of the icon
      • getUrl

        @Exported
        public String getUrl()
        Returns the url for this queue job.
        Returns:
        the url as string.