|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectExecServiceImpl
public class ExecServiceImpl
Execute a local program. This is a singleton service that will execute programs as non-privileged users on the local box. See ExecService.run and ExecService.runUnlimited for details.
Method Summary | |
---|---|
Map<String,String> |
execEnv(Map<String,String> env)
Build the environment used for all exec calls. |
static ExecServiceImpl |
getInstance()
Retrieve the singleton. |
ExecBean |
run(String program,
List<String> args,
Map<String,String> env)
Run the program synchronously as the given user. |
ExecBean |
runUnlimited(String program,
List<String> args,
Map<String,String> env)
Run the program synchronously as the given user. |
String |
validateProgram(String path)
Given a program name, lookup the fully qualified path. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ExecServiceImpl getInstance()
public ExecBean run(String program, List<String> args, Map<String,String> env) throws NotAuthorizedException, BusyException, ExecuteException, IOException
run
in interface ExecService
program
- The program to runargs
- Arguments to pass to the programenv
- Any extra environment variables to set
NotAuthorizedException
BusyException
ExecuteException
IOException
public ExecBean runUnlimited(String program, List<String> args, Map<String,String> env) throws NotAuthorizedException, ExecuteException, IOException
runUnlimited
in interface ExecService
program
- The program to run.args
- Arguments to pass to the programenv
- Any extra environment variables to set
NotAuthorizedException
ExecuteException
IOException
public Map<String,String> execEnv(Map<String,String> env)
public String validateProgram(String path) throws NotAuthorizedException, IOException
path
- The path of the program.
NotAuthorizedException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |