public class ExecServiceImpl extends java.lang.Object implements ExecService
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.String> |
execEnv(java.util.Map<java.lang.String,java.lang.String> env)
Build the environment used for all exec calls.
|
static ExecServiceImpl |
getInstance()
Retrieve the singleton.
|
ExecBean |
run(java.lang.String program,
java.util.List<java.lang.String> args,
java.util.Map<java.lang.String,java.lang.String> env)
Run the program synchronously as the given user.
|
ExecBean |
runUnlimited(java.lang.String program,
java.util.List<java.lang.String> args,
java.util.Map<java.lang.String,java.lang.String> env)
Run the program synchronously as the given user.
|
java.lang.String |
validateProgram(java.lang.String path)
Given a program name, lookup the fully qualified path.
|
public static ExecServiceImpl getInstance()
public ExecBean run(java.lang.String program, java.util.List<java.lang.String> args, java.util.Map<java.lang.String,java.lang.String> env) throws NotAuthorizedException, BusyException, ExecuteException, java.io.IOException
run
in interface ExecService
program
- The program to runargs
- Arguments to pass to the programenv
- Any extra environment variables to setNotAuthorizedException
BusyException
ExecuteException
java.io.IOException
public ExecBean runUnlimited(java.lang.String program, java.util.List<java.lang.String> args, java.util.Map<java.lang.String,java.lang.String> env) throws NotAuthorizedException, ExecuteException, java.io.IOException
runUnlimited
in interface ExecService
program
- The program to run.args
- Arguments to pass to the programenv
- Any extra environment variables to setNotAuthorizedException
ExecuteException
java.io.IOException
public java.util.Map<java.lang.String,java.lang.String> execEnv(java.util.Map<java.lang.String,java.lang.String> env)
public java.lang.String validateProgram(java.lang.String path) throws NotAuthorizedException, java.io.IOException
path
- The path of the program.NotAuthorizedException
java.io.IOException
Copyright © 2012 The Apache Software Foundation