class CommandSessionImpl.JobImpl extends java.lang.Object implements Job, java.lang.Runnable
Job.Status, Job.Utils
Modifier and Type | Field and Description |
---|---|
private java.util.List<Job> |
children |
private java.lang.CharSequence |
command |
private java.util.concurrent.Future<?> |
future |
private int |
id |
private CommandSessionImpl.JobImpl |
parent |
private java.util.List<Pipe> |
pipes |
private Pipe.Result |
result |
private Job.Status |
status |
Constructor and Description |
---|
JobImpl(int id,
CommandSessionImpl.JobImpl parent,
java.lang.CharSequence command) |
Modifier and Type | Method and Description |
---|---|
void |
add(Job child) |
(package private) void |
addPipe(Pipe pipe) |
void |
background() |
java.lang.CharSequence |
command() |
protected void |
done() |
void |
foreground() |
int |
id() |
void |
interrupt() |
Job |
parent() |
java.util.List<Process> |
processes() |
Pipe.Result |
result() |
void |
run() |
CommandSession |
session() |
private void |
setStatus(Job.Status newStatus) |
private void |
setStatus(Job.Status newStatus,
boolean callListeners) |
Pipe.Result |
start(Job.Status status)
Start the job.
|
Job.Status |
status() |
void |
suspend() |
private final int id
private final CommandSessionImpl.JobImpl parent
private final java.lang.CharSequence command
private final java.util.List<Pipe> pipes
private final java.util.List<Job> children
private Job.Status status
private java.util.concurrent.Future<?> future
private Pipe.Result result
public JobImpl(int id, CommandSessionImpl.JobImpl parent, java.lang.CharSequence command)
void addPipe(Pipe pipe)
public Job.Status status()
public void background()
background
in interface Job
public void foreground()
foreground
in interface Job
protected void done()
private void setStatus(Job.Status newStatus)
private void setStatus(Job.Status newStatus, boolean callListeners)
public Pipe.Result result()
public Pipe.Result start(Job.Status status) throws java.lang.InterruptedException
status
- the desired job statusnull
if the job
has been suspended or moved to background,java.lang.InterruptedException
public CommandSession session()
public void run()
run
in interface java.lang.Runnable
public void add(Job child)