Package org.jline.shell
Interface Job
- All Known Implementing Classes:
DefaultJob
public interface Job
Represents a job in the shell's job control system.
A job tracks the execution of a command, including its lifecycle status. Jobs can be in foreground, background, suspended, or done states.
- Since:
- 4.0
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptioncommand()Returns the command string associated with this job.longid()Returns the unique identifier for this job.voidInterrupts this job.voidresume(boolean foreground) Resumes this job.status()Returns the current status of this job.voidsuspend()Suspends this job.
-
Method Details
-
id
long id()Returns the unique identifier for this job.- Returns:
- the job id
-
command
-
status
-
interrupt
void interrupt()Interrupts this job. -
suspend
void suspend()Suspends this job. -
resume
void resume(boolean foreground) Resumes this job.- Parameters:
foreground- if true, resume in foreground; otherwise resume in background
-