Package org.jline.shell
Interface JobManager
-
- All Known Implementing Classes:
DefaultJobManager
public interface JobManagerManages 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddJobListener(JobListener listener)Adds a job listener.JobforegroundJob()Returns the current foreground job, ornullif no job is in the foreground.Jobget(long id)Returns the job with the specified id, ornullif not found.java.util.List<Job>jobs()Returns all tracked jobs.voidremoveJobListener(JobListener listener)Removes a job listener.
-
-
-
Method Detail
-
foregroundJob
Job foregroundJob()
Returns the current foreground job, ornullif no job is in the foreground.- Returns:
- the foreground job, or null
-
jobs
java.util.List<Job> jobs()
Returns all tracked jobs.- Returns:
- list of all jobs
-
get
Job get(long id)
Returns the job with the specified id, ornullif 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
-
-