org.crsh.shell
Interface ShellProcess
- All Known Implementing Classes:
- AsyncProcess, CRaSHCommandProcess, CRaSHProcess, CRaSHResponseProcess, ServerProcess
-
public interface ShellProcess
A shell process.
execute
void execute(ShellProcessContext processContext)
throws IllegalStateException
-
Begin the process. The client of this method should make no assumption whether the process is executed in a synchronous or asynchronous manner. The process will be termined when the process signals it with an invocation of the
ShellProcessContext.end(ShellResponse)
method.
-
- Parameters:
processContext
- the process context
- Throws:
IllegalStateException
- if the process is already executing or has been executed
getKeyHandler
KeyHandler getKeyHandler()
throws IllegalStateException
-
Returns the key handler or null if the process won't handle key events.
-
- Returns:
- the key handler for this process
- Throws:
IllegalStateException
cancel
void cancel()
throws IllegalStateException
-
Signals the process it should be cancelled. This method cannot be be called before the process has started, it can be called multiple times after the process has started. The cancellation of the process is asynchronous, the cancellation of the process will terminate the current context lifecycle by calling the
ShellProcessContext.end(ShellResponse)
method.
-
- Throws:
IllegalStateException
- if the execution has not yet started
Copyright © 2015 eXo Platform SAS. All Rights Reserved.