Package org.jline.shell
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 TypeMethodDescriptionvoidaddJobListener(JobListener listener) Adds a job listener.Returns the current foreground job, ornullif no job is in the foreground.get(long id) Returns the job with the specified id, ornullif not found.jobs()Returns all tracked jobs.voidremoveJobListener(JobListener listener) Removes a job listener.
-
Method Details
-
foregroundJob
Job foregroundJob()Returns the current foreground job, ornullif no job is in the foreground.- Returns:
- the foreground job, or null
-
jobs
-
get
Returns the job with the specified id, ornullif not found.- Parameters:
id- the job id- Returns:
- the job, or null
-
addJobListener
Adds a job listener.- Parameters:
listener- the listener to add
-
removeJobListener
Removes a job listener.- Parameters:
listener- the listener to remove
-