|
||||||||||
PREV CLASS NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
org.jboss.system.ServiceMBeanSupport (src)
org.jboss.varia.process.ChildProcessService
A service to manage a child process.
Nested Class Summary | |
protected static class |
ChildProcessService.ReaderLoggerAdapter (src)
|
Field Summary | |
protected java.lang.Process |
childProcess
The child, we are so proud. |
protected java.lang.String |
commandLine
The command line of the process to execute. |
protected java.util.Properties |
env
The environment for the process. |
protected ChildProcessService.ReaderLoggerAdapter (src) |
errorAdapter
The input adapter, which takes the process' STDERR and turns them into logger calls. |
protected ChildProcessService.ReaderLoggerAdapter (src) |
inputAdapter
The input adapter, which takes the process' STDOUT and turns them into logger calls. |
protected java.lang.String |
loggerAdapterName
The name of the logger adapter for the child process' streams. |
protected java.io.File |
workingDir
The working directory of the process. |
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src) |
log, server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.system.ServiceMBean (src) |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Constructor Summary | |
ChildProcessService()
|
Method Summary | |
java.lang.String |
getCommandLine()
|
java.util.Properties |
getEnvironment()
|
java.lang.Integer |
getExitValue()
|
java.lang.String |
getLoggerAdapterName()
|
java.io.File |
getWorkingDirectory()
|
protected java.lang.String[] |
makeEnvArray(java.util.Properties props)
|
void |
setCommandLine(java.lang.String commandLine)
|
void |
setEnvironment(java.util.Properties env)
|
void |
setLoggerAdapterName(java.lang.String name)
|
void |
setWorkingDirectory(java.io.File dir)
|
protected void |
startService()
Sub-classes should override this method to provide custum 'start' logic. |
protected void |
stopService()
Sub-classes should override this method to provide custum 'stop' logic. |
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src) |
create, createService, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop |
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport (src) |
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String commandLine
protected java.util.Properties env
protected java.io.File workingDir
protected java.lang.Process childProcess
protected java.lang.String loggerAdapterName
protected ChildProcessService.ReaderLoggerAdapter (src) inputAdapter
protected ChildProcessService.ReaderLoggerAdapter (src) errorAdapter
Constructor Detail |
public ChildProcessService()
Method Detail |
public void setCommandLine(java.lang.String commandLine)
public java.lang.String getCommandLine()
public void setEnvironment(java.util.Properties env)
public java.util.Properties getEnvironment()
public void setWorkingDirectory(java.io.File dir)
public java.io.File getWorkingDirectory()
public java.lang.Integer getExitValue()
public void setLoggerAdapterName(java.lang.String name)
public java.lang.String getLoggerAdapterName()
protected java.lang.String[] makeEnvArray(java.util.Properties props)
protected void startService() throws java.lang.Exception
ServiceMBeanSupport (src)
This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.
startService
in class ServiceMBeanSupport (src)
java.lang.Exception
protected void stopService() throws java.lang.Exception
ServiceMBeanSupport (src)
This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.
stopService
in class ServiceMBeanSupport (src)
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |