public class ServerAutomaton extends Object implements Shell
Modifier and Type | Field and Description |
---|---|
(package private) ObjectInputStream |
in
.
|
(package private) CloseableList |
listeners
.
|
(package private) Logger |
log
.
|
(package private) ObjectOutputStream |
out
.
|
(package private) ServerProcess |
process
.
|
Constructor and Description |
---|
ServerAutomaton(InputStream in,
OutputStream out) |
ServerAutomaton(ObjectOutputStream out,
ObjectInputStream in) |
Modifier and Type | Method and Description |
---|---|
ServerAutomaton |
addCloseListener(Closeable closeable) |
(package private) void |
cancel(ServerProcess process) |
void |
close() |
CompletionMatch |
complete(String prefix)
Completion.
|
ShellProcess |
createProcess(String request)
Process a request.
|
(package private) void |
execute(ServerProcess process,
ShellProcessContext processContext) |
String |
getPrompt()
Returns the shell prompt.
|
String |
getWelcome()
Returns the welcome message.
|
final ObjectInputStream in
final ObjectOutputStream out
ServerProcess process
final CloseableList listeners
public ServerAutomaton(ObjectOutputStream out, ObjectInputStream in)
public ServerAutomaton(InputStream in, OutputStream out) throws IOException
IOException
public ServerAutomaton addCloseListener(Closeable closeable)
public String getWelcome()
Shell
getWelcome
in interface Shell
public String getPrompt()
Shell
public ShellProcess createProcess(String request) throws IllegalStateException
Shell
createProcess
in interface Shell
request
- the request to processIllegalStateException
- if the shell cannot create a processpublic CompletionMatch complete(String prefix)
Shell
public void close()
close
in interface Closeable
close
in interface AutoCloseable
void execute(ServerProcess process, ShellProcessContext processContext) throws IllegalStateException
IllegalStateException
void cancel(ServerProcess process) throws IllegalStateException
IllegalStateException
Copyright © 2015 eXo Platform SAS. All Rights Reserved.