org.codehaus.mojo.pomtools.console.toolkit
Class ConsoleApp

java.lang.Object
  extended by org.codehaus.mojo.pomtools.console.toolkit.ConsoleApp

public class ConsoleApp
extends java.lang.Object

Version:
$Id: ConsoleApp.java 2166 2006-07-18 21:32:16Z carlos $
Author:
David Hawkins

Nested Class Summary
static interface ConsoleApp.InitialState
           
 
Constructor Summary
ConsoleApp(Terminal terminal, ConsoleApp.InitialState initialState)
           
 
Method Summary
 void execute()
           
static ConsoleApp getCurrent()
          Returns the ThreadLocal instance of this ConsoleApp.
 Terminal getTerminal()
           
static boolean hasCurrent()
           
protected  void initialize()
           
static void setCurrent(ConsoleApp app)
          Sets the ThreadLocal ConsoleApp instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsoleApp

public ConsoleApp(Terminal terminal,
                  ConsoleApp.InitialState initialState)
Method Detail

initialize

protected void initialize()

getCurrent

public static ConsoleApp getCurrent()
Returns the ThreadLocal instance of this ConsoleApp. You must call setCurrent(ConsoleApp) before calling this function.

Throws:
java.lang.IllegalStateException - if the current connection is not set

setCurrent

public static void setCurrent(ConsoleApp app)
Sets the ThreadLocal ConsoleApp instance. See getCurrent() for more information.


hasCurrent

public static boolean hasCurrent()

execute

public void execute()
             throws ConsoleExecutionException
Throws:
ConsoleExecutionException

getTerminal

public Terminal getTerminal()


Copyright © 2009 The Codehaus. All Rights Reserved.