public class DefaultExecService extends AbstractContexed implements ExecService
conn
Constructor and Description |
---|
DefaultExecService(AppContext conn) |
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
AppContext is being closed. |
DeferredProcessProxy |
exec_deferred(byte[] input,
java.lang.String command)
Make a
DeferredProcessProxy to be run later. |
ProcessProxy |
exec(long timeout_milliseconds,
java.lang.String command)
Run a external command (waiting for it to complete)
|
ProcessProxy |
exec(java.lang.String input,
long timeout,
java.lang.String line)
Run a external command with supplied input (waiting for it to complete)
|
java.lang.Class<? super ExecService> |
getType()
Returns the type of service the class should be registered under.
|
getContext, getLogger, resetLogger
public DefaultExecService(AppContext conn)
conn
- public void cleanup()
AppContextCleanup
AppContext
is being closed.
Only use this for cleanup that can't be handled by
normal garbage collection or for state which is never returned by reference.cleanup
in interface AppContextCleanup
public java.lang.Class<? super ExecService> getType()
AppContextService
getType
in interface AppContextService<ExecService>
public ProcessProxy exec(java.lang.String input, long timeout, java.lang.String line) throws java.lang.Exception
ExecService
exec
in interface ExecService
ProcessProxy
java.io.IOException
java.lang.InterruptedException
java.lang.Exception
public ProcessProxy exec(long timeout_milliseconds, java.lang.String command) throws java.lang.Exception
ExecService
exec
in interface ExecService
ProcessProxy
java.io.IOException
java.lang.InterruptedException
java.lang.Exception
public DeferredProcessProxy exec_deferred(byte[] input, java.lang.String command) throws java.io.IOException
ExecService
DeferredProcessProxy
to be run later.exec_deferred
in interface ExecService
java.io.IOException