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, resetLoggerpublic DefaultExecService(AppContext conn)
conn - public void cleanup()
AppContextCleanupAppContext 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 AppContextCleanuppublic java.lang.Class<? super ExecService> getType()
AppContextServicegetType in interface AppContextService<ExecService>public ProcessProxy exec(java.lang.String input, long timeout, java.lang.String line) throws java.lang.Exception
ExecServiceexec in interface ExecServiceProcessProxyjava.io.IOExceptionjava.lang.InterruptedExceptionjava.lang.Exceptionpublic ProcessProxy exec(long timeout_milliseconds, java.lang.String command) throws java.lang.Exception
ExecServiceexec in interface ExecServiceProcessProxyjava.io.IOExceptionjava.lang.InterruptedExceptionjava.lang.Exceptionpublic DeferredProcessProxy exec_deferred(byte[] input, java.lang.String command) throws java.io.IOException
ExecServiceDeferredProcessProxy to be run later.exec_deferred in interface ExecServicejava.io.IOException