org.codehaus.plexus.components.interactivity
Class DefaultInputHandler

java.lang.Object
  extended byorg.codehaus.plexus.logging.AbstractLogEnabled
      extended byorg.codehaus.plexus.components.interactivity.AbstractInputHandler
          extended byorg.codehaus.plexus.components.interactivity.DefaultInputHandler
All Implemented Interfaces:
org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable, InputHandler, org.codehaus.plexus.logging.LogEnabled

public class DefaultInputHandler
extends AbstractInputHandler
implements org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable, org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable

Default input handler, that uses the console.

Version:
$Id: DefaultInputHandler.java 2649 2005-10-10 16:51:51Z brett $
Author:
Brett Porter

Field Summary
private  java.io.BufferedReader consoleReader
           
 
Fields inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
 
Fields inherited from interface org.codehaus.plexus.components.interactivity.InputHandler
ROLE
 
Constructor Summary
DefaultInputHandler()
           
 
Method Summary
 void dispose()
           
 void initialize()
           
 java.lang.String readLine()
          Read a single line of input, swalling the newline at the end.
 java.lang.String readPassword()
          Read a single line of input, swalling the newline at the end.
 
Methods inherited from class org.codehaus.plexus.components.interactivity.AbstractInputHandler
readMultipleLines
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

consoleReader

private java.io.BufferedReader consoleReader
Constructor Detail

DefaultInputHandler

public DefaultInputHandler()
Method Detail

readLine

public java.lang.String readLine()
                          throws java.io.IOException
Description copied from interface: InputHandler
Read a single line of input, swalling the newline at the end. If the input can be echoed, it will be.

Specified by:
readLine in interface InputHandler
Returns:
the line read
Throws:
java.io.IOException

readPassword

public java.lang.String readPassword()
                              throws java.io.IOException
Description copied from interface: InputHandler
Read a single line of input, swalling the newline at the end. This method guarantees input is not echoed.

Specified by:
readPassword in interface InputHandler
Returns:
the line read
Throws:
java.io.IOException

initialize

public void initialize()
                throws org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException
Specified by:
initialize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable
Throws:
org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException

dispose

public void dispose()
Specified by:
dispose in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable