|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.varia.process.ChildProcessService
public class ChildProcessService
A service to manage a child process.
Nested Class Summary | |
---|---|
protected static class |
ChildProcessService.ReaderLoggerAdapter
|
Field Summary | |
---|---|
protected Process |
childProcess
The child, we are so proud. |
protected String |
commandLine
The command line of the process to execute. |
protected Properties |
env
The environment for the process. |
protected ChildProcessService.ReaderLoggerAdapter |
errorAdapter
The input adapter, which takes the process' STDERR and turns them into logger calls. |
protected ChildProcessService.ReaderLoggerAdapter |
inputAdapter
The input adapter, which takes the process' STDOUT and turns them into logger calls. |
protected String |
loggerAdapterName
The name of the logger adapter for the child process' streams. |
protected File |
workingDir
The working directory of the process. |
Fields inherited from class org.jboss.system.ServiceMBeanSupport |
---|
log, server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.system.ServiceMBean |
---|
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Constructor Summary | |
---|---|
ChildProcessService()
|
Method Summary | |
---|---|
String |
getCommandLine()
|
Properties |
getEnvironment()
|
Integer |
getExitValue()
|
String |
getLoggerAdapterName()
|
File |
getWorkingDirectory()
|
protected String[] |
makeEnvArray(Properties props)
|
void |
setCommandLine(String commandLine)
|
void |
setEnvironment(Properties env)
|
void |
setLoggerAdapterName(String name)
|
void |
setWorkingDirectory(File dir)
|
protected void |
startService()
|
protected void |
stopService()
|
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
---|
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.system.ServiceMBean |
---|
getName, getState, getStateString, jbossInternalLifecycle |
Methods inherited from interface org.jboss.system.Service |
---|
create, destroy, start, stop |
Field Detail |
---|
protected String commandLine
protected Properties env
protected File workingDir
protected Process childProcess
protected String loggerAdapterName
protected ChildProcessService.ReaderLoggerAdapter inputAdapter
protected ChildProcessService.ReaderLoggerAdapter errorAdapter
Constructor Detail |
---|
public ChildProcessService()
Method Detail |
---|
public void setCommandLine(String commandLine)
setCommandLine
in interface ChildProcessServiceMBean
public String getCommandLine()
getCommandLine
in interface ChildProcessServiceMBean
public void setEnvironment(Properties env)
setEnvironment
in interface ChildProcessServiceMBean
public Properties getEnvironment()
getEnvironment
in interface ChildProcessServiceMBean
public void setWorkingDirectory(File dir)
setWorkingDirectory
in interface ChildProcessServiceMBean
public File getWorkingDirectory()
getWorkingDirectory
in interface ChildProcessServiceMBean
public Integer getExitValue()
getExitValue
in interface ChildProcessServiceMBean
public void setLoggerAdapterName(String name)
setLoggerAdapterName
in interface ChildProcessServiceMBean
public String getLoggerAdapterName()
getLoggerAdapterName
in interface ChildProcessServiceMBean
protected String[] makeEnvArray(Properties props)
protected void startService() throws Exception
startService
in class ServiceMBeanSupport
Exception
protected void stopService() throws Exception
stopService
in class ServiceMBeanSupport
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |