Package io.vertx.mutiny.ext.shell.system
Class Job
- java.lang.Object
-
- io.vertx.mutiny.ext.shell.system.Job
-
public class Job extends Object
A job executed in aJobController
, grouping one or several process. The job life cycle can be controlled with therun()
,resume()
andsuspend()
andinterrupt()
methods. NOTE: This class has been automatically generated from theoriginal
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<Job>
__TYPE_ARG
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
io.vertx.ext.shell.system.Job
getDelegate()
int
hashCode()
int
id()
boolean
interrupt()
long
lastStopped()
String
line()
static Job
newInstance(io.vertx.ext.shell.system.Job arg)
Process
process()
Job
resume()
Job
resume(boolean foreground)
Job
run()
Job
setSession(Session session)
Job
setTty(Tty tty)
io.vertx.ext.shell.system.ExecStatus
status()
Job
statusUpdateHandler(Consumer<io.vertx.ext.shell.system.ExecStatus> handler)
Job
suspend()
void
terminate()
Job
toBackground()
Job
toForeground()
String
toString()
-
-
-
Constructor Detail
-
Job
public Job(io.vertx.ext.shell.system.Job delegate)
-
Job
public Job(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.ext.shell.system.Job getDelegate()
-
id
public int id()
- Returns:
- the job id
-
status
public io.vertx.ext.shell.system.ExecStatus status()
- Returns:
- the job exec status
-
lastStopped
public long lastStopped()
- Returns:
- when the job was last stopped
-
line
public String line()
- Returns:
- the execution line of the job, i.e the shell command line that launched this job
-
setSession
public Job setSession(Session session)
- Parameters:
session
- the session to use- Returns:
- this object
-
statusUpdateHandler
public Job statusUpdateHandler(Consumer<io.vertx.ext.shell.system.ExecStatus> handler)
- Parameters:
handler
- the terminate handler- Returns:
-
run
public Job run()
- Returns:
- this object
-
interrupt
public boolean interrupt()
- Returns:
- true if the job is actually interrupted
-
resume
public Job resume()
- Returns:
-
toBackground
public Job toBackground()
- Returns:
- this object
-
toForeground
public Job toForeground()
- Returns:
- this object
-
resume
public Job resume(boolean foreground)
- Parameters:
foreground
- true when the job is resumed in foreground- Returns:
- the instance of Job to chain method calls.
-
suspend
public Job suspend()
- Returns:
- this object
-
terminate
public void terminate()
-
process
public Process process()
- Returns:
- the first process in the job
-
newInstance
public static Job newInstance(io.vertx.ext.shell.system.Job arg)
-
-