org.rhq.enterprise.communications.command.impl.start.server
Class ProcessExec
java.lang.Object
org.rhq.enterprise.communications.command.impl.start.server.ProcessExec
public class ProcessExec
- extends Object
Used to execute a process. Uses StartCommand as the object used to encapsulate the metadata about the process
to start.
Warning: caution should be exercised when using this class - it allows any process to be started with no
security restrictions.
- Author:
- John Mazzitelli
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProcessExec
public ProcessExec()
execute
public StartCommandResponse execute(StartCommand command)
- This executes any operating system process as described in the given start command. When this method returns, it
can be assumed that the process was launched but not necessarily finished. The caller can ask this method to
block until process exits by setting
StartCommand.getWaitForExit(). On error, the exception will be
returned in the returned response.
Subclasses may override this method to accept different types of commands; they just need to ensure that if
they call this super method, that the command is of type StartCommand.
- Parameters:
command - the command that contains metadata about the process to start
- Returns:
- the results of the command execution
Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.