org.lsst.ccs.shell
Class ConsoleIO

java.lang.Object
  extended by org.lsst.ccs.shell.ConsoleIO
All Implemented Interfaces:
Input, Output, ShellManageable

public class ConsoleIO
extends Object
implements Input, Output, ShellManageable

Console IO subsystem. This is also one of special command handlers and is responsible for logging (duplicating output) and execution of scripts.

Author:
ASG

Constructor Summary
ConsoleIO()
           
 
Method Summary
 void addCompleter(jline.console.completer.Completer completer)
           
 void cliEnterLoop()
          This method is called when it is about to enter the command loop.
 void cliLeaveLoop()
          This method is called when Shell is leaving the command loop.
 String disableFileHistory()
           
 String disableLogging()
           
 String enableFileHistory(String filename)
           
 void enableLogging(String filename)
           
 String history()
           
 void output(Object obj, OutputConversionEngine oce)
           
 void outputException(String input, TokenException error)
           
 void outputException(Throwable e)
           
 void outputHeader(String text)
           
 String readCommand(List<String> path)
           
 void runScript(String filename)
           
 void setCommandTable(CommandTable commandTable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsoleIO

public ConsoleIO()
Method Detail

readCommand

public String readCommand(List<String> path)
Specified by:
readCommand in interface Input

setCommandTable

public void setCommandTable(CommandTable commandTable)

addCompleter

public void addCompleter(jline.console.completer.Completer completer)

runScript

public void runScript(String filename)
               throws FileNotFoundException
Throws:
FileNotFoundException

outputHeader

public void outputHeader(String text)
Specified by:
outputHeader in interface Output

output

public void output(Object obj,
                   OutputConversionEngine oce)
Specified by:
output in interface Output

outputException

public void outputException(String input,
                            TokenException error)
Specified by:
outputException in interface Output

outputException

public void outputException(Throwable e)
Specified by:
outputException in interface Output

cliEnterLoop

public void cliEnterLoop()
Description copied from interface: ShellManageable
This method is called when it is about to enter the command loop.

Specified by:
cliEnterLoop in interface ShellManageable

cliLeaveLoop

public void cliLeaveLoop()
Description copied from interface: ShellManageable
This method is called when Shell is leaving the command loop.

Specified by:
cliLeaveLoop in interface ShellManageable

enableLogging

public void enableLogging(String filename)
                   throws FileNotFoundException
Throws:
FileNotFoundException

disableLogging

public String disableLogging()

enableFileHistory

public String enableFileHistory(String filename)

disableFileHistory

public String disableFileHistory()

history

public String history()


Copyright © 2013 LSST. All Rights Reserved.