org.crsh.shell.impl.remoting
Class ServerAutomaton
java.lang.Object
org.crsh.shell.impl.remoting.ServerAutomaton
- All Implemented Interfaces:
- Closeable, Shell
-
public class ServerAutomaton
- extends Object
-
- implements Shell
-
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
final Logger log
-
.
in
final ObjectInputStream in
-
.
out
final ObjectOutputStream out
-
.
process
ServerProcess process
-
.
listeners
final CloseableList listeners
-
.
ServerAutomaton
public ServerAutomaton(ObjectOutputStream out,
ObjectInputStream in)
ServerAutomaton
public ServerAutomaton(InputStream in,
OutputStream out)
throws IOException
-
- Throws:
IOException
addCloseListener
public ServerAutomaton addCloseListener(Closeable closeable)
-
-
getWelcome
public String getWelcome()
- Description copied from interface:
Shell
-
Returns the welcome message.
-
- Specified by:
getWelcome
in interface Shell
-
- Returns:
- the welcome message
getPrompt
public String getPrompt()
- Description copied from interface:
Shell
-
Returns the shell prompt.
-
- Specified by:
getPrompt
in interface Shell
-
- Returns:
- the shell prompt
createProcess
public ShellProcess createProcess(String request)
throws IllegalStateException
- Description copied from interface:
Shell
-
Process a request.
-
- Specified by:
createProcess
in interface Shell
-
- Parameters:
request
- the request to process
- Returns:
- the process
- Throws:
IllegalStateException
- if the shell cannot create a process
complete
public CompletionMatch complete(String prefix)
- Description copied from interface:
Shell
-
Completion.
-
- Specified by:
complete
in interface Shell
-
- Parameters:
prefix
- the prefix to complete
- Returns:
- the sorted list of available suffixes
close
public void close()
-
- Specified by:
close
in interface Closeable
-
execute
void execute(ServerProcess process,
ShellProcessContext processContext)
throws IllegalStateException
-
-
- Throws:
IllegalStateException
cancel
void cancel(ServerProcess process)
throws IllegalStateException
-
-
- Throws:
IllegalStateException
Copyright © 2014 eXo Platform SAS. All Rights Reserved.