|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
The Executor interface is used to run an OS command with less security risk. Implementations should do as much as possible to minimize the risk of injection into either the command or parameters. In addition, implementations should timeout after a specified time period in order to help prevent denial of service attacks. The class should perform logging and error handling as well. Finally, implementation should handle errors and generate an ExecutorException with all the necessary information.
| Method Summary | |
java.lang.String |
executeSystemCommand(java.io.File executable,
java.util.List params,
java.io.File workdir,
int timeoutSeconds)
Executes a system command after checking that the executable exists and that the parameters have not been subject to injection with untrusted user data. |
| Method Detail |
public java.lang.String executeSystemCommand(java.io.File executable,
java.util.List params,
java.io.File workdir,
int timeoutSeconds)
throws ExecutorException
params - the paramsworkdir - the workdirtimeoutSeconds - the timeout seconds
ExecutorException - the service exception
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||