org.crsh.shell.impl.remoting
Class ServerAutomaton

java.lang.Object
  extended by org.crsh.shell.impl.remoting.ServerAutomaton
All Implemented Interfaces:
Closeable, Shell

public class ServerAutomaton
extends Object
implements Shell


Constructor Summary
ServerAutomaton(InputStream in, OutputStream out)
           
ServerAutomaton(ObjectOutputStream out, ObjectInputStream in)
           
 
Method Summary
 ServerAutomaton addCloseListener(Closeable closeable)
           
 void close()
           
 org.crsh.cli.impl.completion.CompletionMatch complete(String prefix)
          Completion.
 ShellProcess createProcess(String request)
          Process a request.
 String getPrompt()
          Returns the shell prompt.
 String getWelcome()
          Returns the welcome message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerAutomaton

public ServerAutomaton(ObjectOutputStream out,
                       ObjectInputStream in)

ServerAutomaton

public ServerAutomaton(InputStream in,
                       OutputStream out)
                throws IOException
Throws:
IOException
Method Detail

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 org.crsh.cli.impl.completion.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


Copyright © 2015 eXo Platform SAS. All Rights Reserved.