org.apache.karaf.shell.console.jline
Class Console

java.lang.Object
  extended by org.apache.karaf.shell.console.jline.Console
All Implemented Interfaces:
java.lang.Runnable

public class Console
extends java.lang.Object
implements java.lang.Runnable


Field Summary
static java.lang.String DEFAULT_PROMPT
           
static java.lang.String LAST_EXCEPTION
           
static java.lang.String PRINT_STACK_TRACES
           
static java.lang.String PROMPT
           
protected  org.apache.felix.service.command.CommandSession session
           
static java.lang.String SHELL_INIT_SCRIPT
           
 
Constructor Summary
Console(org.apache.felix.service.command.CommandProcessor processor, java.io.InputStream in, java.io.PrintStream out, java.io.PrintStream err, jline.Terminal term, java.lang.Runnable closeCallback)
           
 
Method Summary
 void close()
           
protected  Completer createCompleter()
           
protected  java.io.File getHistoryFile()
          Subclasses can override to use a different history file.
protected  java.lang.String getPrompt()
           
 org.apache.felix.service.command.CommandSession getSession()
           
protected  boolean isPrintStackTraces()
           
protected  java.util.Properties loadBrandingProperties()
           
protected  void loadProps(java.util.Properties props, java.lang.String resource)
           
 void run()
           
protected  void setSessionProperties()
           
protected  void welcome()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHELL_INIT_SCRIPT

public static final java.lang.String SHELL_INIT_SCRIPT
See Also:
Constant Field Values

PROMPT

public static final java.lang.String PROMPT
See Also:
Constant Field Values

DEFAULT_PROMPT

public static final java.lang.String DEFAULT_PROMPT
See Also:
Constant Field Values

PRINT_STACK_TRACES

public static final java.lang.String PRINT_STACK_TRACES
See Also:
Constant Field Values

LAST_EXCEPTION

public static final java.lang.String LAST_EXCEPTION
See Also:
Constant Field Values

session

protected org.apache.felix.service.command.CommandSession session
Constructor Detail

Console

public Console(org.apache.felix.service.command.CommandProcessor processor,
               java.io.InputStream in,
               java.io.PrintStream out,
               java.io.PrintStream err,
               jline.Terminal term,
               java.lang.Runnable closeCallback)
        throws Exception
Throws:
Exception
Method Detail

getHistoryFile

protected java.io.File getHistoryFile()
Subclasses can override to use a different history file.

Returns:

getSession

public org.apache.felix.service.command.CommandSession getSession()

close

public void close()

run

public void run()
Specified by:
run in interface java.lang.Runnable

isPrintStackTraces

protected boolean isPrintStackTraces()

welcome

protected void welcome()

setSessionProperties

protected void setSessionProperties()

createCompleter

protected Completer createCompleter()

loadBrandingProperties

protected java.util.Properties loadBrandingProperties()

loadProps

protected void loadProps(java.util.Properties props,
                         java.lang.String resource)

getPrompt

protected java.lang.String getPrompt()


Copyright © 2007-2011 Apache Software Foundation. All Rights Reserved.