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, org.apache.sshd.server.Command, org.apache.sshd.server.SessionAware, Terminal

public class CRaSHCommand
extends AbstractCommand
implements Runnable, Terminal


Field Summary
private  JLineProcessor console
          .
private  SSHContext context
          .
private  String encoding
          .
private  CRaSHCommandFactory factory
          .
protected static Logger log
          .
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()
           
 String getOutputEncoding()
           
 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

log

protected static final Logger log
.


factory

private final CRaSHCommandFactory factory
.


thread

private Thread thread
.


encoding

private String encoding
.


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

getOutputEncoding

public String getOutputEncoding()
Specified by:
getOutputEncoding in interface Terminal

init

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

restore

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

reset

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

isSupported

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

getWidth

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

getHeight

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

isAnsiSupported

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

wrapOutIfNeeded

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

wrapInIfNeeded

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

hasWeirdWrap

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

isEchoEnabled

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

setEchoEnabled

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


Copyright © 2015 eXo Platform SAS. All Rights Reserved.