Interface JobManager

All Known Implementing Classes:
DefaultJobManager

public interface JobManager
Manages jobs in the shell's job control system.

The job manager tracks running, suspended, and completed jobs and provides methods for querying and listening to job state changes.

Since:
4.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds a job listener.
    Returns the current foreground job, or null if no job is in the foreground.
    get(long id)
    Returns the job with the specified id, or null if not found.
    Returns all tracked jobs.
    void
    Removes a job listener.
  • Method Details

    • foregroundJob

      Job foregroundJob()
      Returns the current foreground job, or null if no job is in the foreground.
      Returns:
      the foreground job, or null
    • jobs

      List<Job> jobs()
      Returns all tracked jobs.
      Returns:
      list of all jobs
    • get

      Job get(long id)
      Returns the job with the specified id, or null if not found.
      Parameters:
      id - the job id
      Returns:
      the job, or null
    • addJobListener

      void addJobListener(JobListener listener)
      Adds a job listener.
      Parameters:
      listener - the listener to add
    • removeJobListener

      void removeJobListener(JobListener listener)
      Removes a job listener.
      Parameters:
      listener - the listener to remove