public class IProcess extends IUnknown
Constructor and Description |
---|
IProcess(java.lang.String wrapped,
org.virtualbox_6_1.ObjectRefManager objMgr,
org.virtualbox_6_1.jaxws.VboxPortType port) |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
getArguments()
The arguments this process is using for execution.
|
java.util.List<java.lang.String> |
getEnvironment()
The initial process environment.
|
IEventSource |
getEventSource()
Event source for process events.
|
java.lang.String |
getExecutablePath()
Full path of the actual executable image.
|
java.lang.Integer |
getExitCode()
The exit code.
|
java.lang.String |
getName()
The friendly name of this process.
|
java.lang.Long |
getPID()
The process ID (PID).
|
ProcessStatus |
getStatus()
The current process status; see
ProcessStatus for more information. |
static IProcess |
queryInterface(IUnknown obj) |
byte[] |
read(java.lang.Long handle,
java.lang.Long toRead,
java.lang.Long timeoutMS)
Reads data from a running process.
|
void |
terminate()
Terminates (kills) a running process.
|
ProcessWaitResult |
waitFor(java.lang.Long waitFor,
java.lang.Long timeoutMS)
Waits for one or more events to happen.
|
ProcessWaitResult |
waitForArray(java.util.List<ProcessWaitForFlag> waitFor,
java.lang.Long timeoutMS)
Waits for one or more events to happen.
|
java.lang.Long |
write(java.lang.Long handle,
java.lang.Long flags,
byte[] data,
java.lang.Long timeoutMS)
Writes data to a running process.
|
java.lang.Long |
writeArray(java.lang.Long handle,
java.util.List<ProcessInputFlag> flags,
byte[] data,
java.lang.Long timeoutMS)
Writes data to a running process.
|
getObjMgr, getRemoteWSPort, getWrapped, releaseRemote
public IProcess(java.lang.String wrapped, org.virtualbox_6_1.ObjectRefManager objMgr, org.virtualbox_6_1.jaxws.VboxPortType port)
public java.util.List<java.lang.String> getArguments()
public java.util.List<java.lang.String> getEnvironment()
public IEventSource getEventSource()
public java.lang.String getExecutablePath()
public java.lang.Integer getExitCode()
public java.lang.String getName()
public java.lang.Long getPID()
public ProcessStatus getStatus()
ProcessStatus
for more information.public ProcessWaitResult waitFor(java.lang.Long waitFor, java.lang.Long timeoutMS)
waitFor
- Specifies what to wait for;
seeProcessWaitForFlag
for more information.timeoutMS
- Timeout (in ms) to wait for the operation to complete.
Pass 0 for an infinite timeout.ProcessWaitResult
for more information.public ProcessWaitResult waitForArray(java.util.List<ProcessWaitForFlag> waitFor, java.lang.Long timeoutMS)
waitFor(Long,Long)
.waitFor
- Specifies what to wait for;
seeProcessWaitForFlag
for more information.timeoutMS
- Timeout (in ms) to wait for the operation to complete.
Pass 0 for an infinite timeout.ProcessWaitResult
for more information.public byte[] read(java.lang.Long handle, java.lang.Long toRead, java.lang.Long timeoutMS)
handle
- Handle to read from. Usually 0 is stdin.toRead
- Number of bytes to read.timeoutMS
- Timeout (in ms) to wait for the operation to complete.
Pass 0 for an infinite timeout.public java.lang.Long write(java.lang.Long handle, java.lang.Long flags, byte[] data, java.lang.Long timeoutMS)
handle
- Handle to write to. Usually 0 is stdin, 1 is stdout and 2 is stderr.flags
- A combination ofProcessInputFlag
flags.data
- Array of bytes to write. The size of the array also specifies
how much to write.timeoutMS
- Timeout (in ms) to wait for the operation to complete.
Pass 0 for an infinite timeout.public java.lang.Long writeArray(java.lang.Long handle, java.util.List<ProcessInputFlag> flags, byte[] data, java.lang.Long timeoutMS)
write(Long,Long,byte[],Long)
.handle
- Handle to write to. Usually 0 is stdin, 1 is stdout and 2 is stderr.flags
- A combination ofProcessInputFlag
flags.data
- Array of bytes to write. The size of the array also specifies
how much to write.timeoutMS
- Timeout (in ms) to wait for the operation to complete.
Pass 0 for an infinite timeout.public void terminate()