class ProcessSpawner extends java.lang.Object implements CSProcess
System.err
or System.out
streams.Modifier and Type | Field and Description |
---|---|
private ApplicationID |
applicationID
The application identifier of the caller that the child should adopt.
|
private NetChannelOutput |
caller
For sending data back to the calling JVM who is running the
RemoteProcess proxy. |
private java.lang.String |
classPath
The classpath the spawned JVM should use to get the caller's classes from a networked
filesystem or
null if the default classpath should be used. |
private NodeFactory |
factory
The factory the child should use to initialize its node or
null if the default initialization
should take place. |
(package private) static int |
MSG_EXCEPTION
An
Exception follows that was raised by the spawned process. |
(package private) static int |
MSG_FAIL
An
Exception follows that was raised by the spawned process on failure. |
(package private) static int |
MSG_OK
The process terminated without error.
|
(package private) static int |
MSG_STDERR
A
String follows with a line of text that was for System.err . |
(package private) static int |
MSG_STDOUT
A
String follows with a line of text that was for System.out . |
private static java.lang.Integer |
msgEXCEPTION
An
Exception follows that was raised by the spawned process. |
private static java.lang.Integer |
msgFAIL
An
Exception follows that was raised by the spawned process on failure. |
private static java.lang.Integer |
msgOK
The process terminated without error.
|
private static java.lang.Integer |
msgSTDERR
A
String follows with a line of text that was for System.err . |
private static java.lang.Integer |
msgSTDOUT
A
String follows with a line of text that was for System.out . |
private CSProcess |
process
The process that needs to be started.
|
private SpawnerService |
service
The parent service that started this one.
|
private java.lang.String |
uniqueName
A unique name generated by the service fo use in creating a temporary file.
|
Constructor and Description |
---|
ProcessSpawner(SpawnerService service,
CSProcess process,
NetChannelOutput caller,
NodeFactory factory,
ApplicationID applicationID,
int unique,
java.lang.String classPath)
Constructs a new spawner.
|
Modifier and Type | Method and Description |
---|---|
void |
run()
Main process loop.
|
static final int MSG_STDOUT
String
follows with a line of text that was for System.out
.static final int MSG_STDERR
String
follows with a line of text that was for System.err
.static final int MSG_EXCEPTION
Exception
follows that was raised by the spawned process.static final int MSG_FAIL
Exception
follows that was raised by the spawned process on failure.static final int MSG_OK
private static final java.lang.Integer msgSTDOUT
String
follows with a line of text that was for System.out
.private static final java.lang.Integer msgSTDERR
String
follows with a line of text that was for System.err
.private static final java.lang.Integer msgEXCEPTION
Exception
follows that was raised by the spawned process.private static final java.lang.Integer msgFAIL
Exception
follows that was raised by the spawned process on failure.private static final java.lang.Integer msgOK
private final SpawnerService service
private final CSProcess process
private final NetChannelOutput caller
RemoteProcess
proxy.private final NodeFactory factory
null
if the default initialization
should take place.private final ApplicationID applicationID
private final java.lang.String uniqueName
private final java.lang.String classPath
null
if the default classpath should be used.public ProcessSpawner(SpawnerService service, CSProcess process, NetChannelOutput caller, NodeFactory factory, ApplicationID applicationID, int unique, java.lang.String classPath)
service
- the parent service that is creating this object.process
- the process that should be run.caller
- for sending data back to the caller.factory
- optional factory for initializing the child process' node.applicationID
- caller's application ID that the child should adopt.unique
- a unique number allocated by the parent service.classPath
- classpath specified by the caller process for any classes available from a
networked filesystem.