org.crsh.ssh.term
Class CRaSHCommand

java.lang.Object
  extended by org.crsh.ssh.term.AbstractCommand
      extended by org.crsh.ssh.term.CRaSHCommand
All Implemented Interfaces:
Runnable, jline.Terminal, org.apache.sshd.server.Command, org.apache.sshd.server.SessionAware

public class CRaSHCommand
extends AbstractCommand
implements Runnable, jline.Terminal


Field Summary
private  JLineProcessor console
          .
private  SSHContext context
          .
private  CRaSHCommandFactory factory
          .
private  Thread thread
          .
 
Fields inherited from class org.crsh.ssh.term.AbstractCommand
callback, err, in, out, session
 
Constructor Summary
CRaSHCommand(CRaSHCommandFactory factory)
           
 
Method Summary
 void destroy()
           
 SSHContext getContext()
           
 int getHeight()
           
 int getWidth()
           
 boolean hasWeirdWrap()
           
 void init()
           
 boolean isAnsiSupported()
           
 boolean isEchoEnabled()
           
 boolean isSupported()
           
 void reset()
           
 void restore()
           
 void run()
           
 void setEchoEnabled(boolean enabled)
           
 void start(org.apache.sshd.server.Environment env)
           
 InputStream wrapInIfNeeded(InputStream in)
           
 OutputStream wrapOutIfNeeded(OutputStream out)
           
 
Methods inherited from class org.crsh.ssh.term.AbstractCommand
setErrorStream, setExitCallback, setInputStream, setOutputStream, setSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

private final CRaSHCommandFactory factory
.


thread

private Thread thread
.


context

private SSHContext context
.


console

private JLineProcessor console
.

Constructor Detail

CRaSHCommand

public CRaSHCommand(CRaSHCommandFactory factory)
Method Detail

start

public void start(org.apache.sshd.server.Environment env)
           throws IOException
Specified by:
start in interface org.apache.sshd.server.Command
Throws:
IOException

getContext

public SSHContext getContext()

destroy

public void destroy()
Specified by:
destroy in interface org.apache.sshd.server.Command

run

public void run()
Specified by:
run in interface Runnable

init

public void init()
          throws Exception
Specified by:
init in interface jline.Terminal
Throws:
Exception

restore

public void restore()
             throws Exception
Specified by:
restore in interface jline.Terminal
Throws:
Exception

reset

public void reset()
           throws Exception
Specified by:
reset in interface jline.Terminal
Throws:
Exception

isSupported

public boolean isSupported()
Specified by:
isSupported in interface jline.Terminal

getWidth

public int getWidth()
Specified by:
getWidth in interface jline.Terminal

getHeight

public int getHeight()
Specified by:
getHeight in interface jline.Terminal

isAnsiSupported

public boolean isAnsiSupported()
Specified by:
isAnsiSupported in interface jline.Terminal

wrapOutIfNeeded

public OutputStream wrapOutIfNeeded(OutputStream out)
Specified by:
wrapOutIfNeeded in interface jline.Terminal

wrapInIfNeeded

public InputStream wrapInIfNeeded(InputStream in)
                           throws IOException
Specified by:
wrapInIfNeeded in interface jline.Terminal
Throws:
IOException

hasWeirdWrap

public boolean hasWeirdWrap()
Specified by:
hasWeirdWrap in interface jline.Terminal

isEchoEnabled

public boolean isEchoEnabled()
Specified by:
isEchoEnabled in interface jline.Terminal

setEchoEnabled

public void setEchoEnabled(boolean enabled)
Specified by:
setEchoEnabled in interface jline.Terminal


Copyright © 2014 eXo Platform SAS. All Rights Reserved.