From b9421dc80af485591a9c50cc8921f912e0def11e Mon Sep 17 00:00:00 2001 From: Ashlee Young Date: Fri, 23 Oct 2015 10:05:40 -0700 Subject: Removing sources to replace with download links instead. Change-Id: Ie28789a725051aec0d1b04dd291b7690a7898668 Signed-off-by: Ashlee Young --- .../ant/apache-ant-1.9.6/manual/inputhandler.html | 116 --------------------- 1 file changed, 116 deletions(-) delete mode 100644 framework/src/ant/apache-ant-1.9.6/manual/inputhandler.html (limited to 'framework/src/ant/apache-ant-1.9.6/manual/inputhandler.html') diff --git a/framework/src/ant/apache-ant-1.9.6/manual/inputhandler.html b/framework/src/ant/apache-ant-1.9.6/manual/inputhandler.html deleted file mode 100644 index 1333157e..00000000 --- a/framework/src/ant/apache-ant-1.9.6/manual/inputhandler.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - -InputHandler - - - -

InputHandler

- -

Overview

- -

When a task wants to prompt a user for input, it doesn't simply -read the input from the console as this would make it impossible to -embed Apache Ant in an IDE. Instead it asks an implementation of the -org.apache.tools.ant.input.InputHandler interface to -prompt the user and hand the user input back to the task.

- -

To do this, the task creates an InputRequest object -and passes it to the InputHandler Such an -InputRequest may know whether a given user input is valid -and the InputHandler is supposed to reject all invalid -input.

- -

Exactly one InputHandler instance is associated with -every Ant process, users can specify the implementation using the --inputhandler command line switch.

- -

InputHandler

- -

The InputHandler interface contains exactly one -method

- -
-    void handleInput(InputRequest request) 
-        throws org.apache.tools.ant.BuildException;
-
- -

with some pre- and postconditions. The main postcondition is that -this method must not return unless the request considers -the user input valid, it is allowed to throw an exception in this -situation.

- -

Ant comes with three built-in implementations of this interface:

- -

DefaultInputHandler

- -

This is the implementation you get, when you don't use the --inputhandler command line switch at all. This -implementation will print the prompt encapsulated in the -request object to Ant's logging system and re-prompt for -input until the user enters something that is considered valid input -by the request object. Input will be read from the -console and the user will need to press the Return key.

- -

PropertyFileInputHandler

- -

This implementation is useful if you want to run unattended build -processes. It reads all input from a properties file and makes the -build fail if it cannot find valid input in this file. The name of -the properties file must be specified in the Java system property -ant.input.properties.

- -

The prompt encapsulated in a request will be used as -the key when looking up the input inside the properties file. If no -input can be found, the input is considered invalid and an exception -will be thrown.

- -

Note that ant.input.properties must -be a Java system property, not an Ant property. I.e. you cannot -define it as a simple parameter to ant, but you can -define it inside the ANT_OPTS environment variable.

- -

GreedyInputHandler

- -

Like the default implementation, this InputHandler reads from standard -input. However, it consumes all available input. This behavior is -useful for sending Ant input via an OS pipe. Since Ant 1.7.

- -

SecureInputHandler

- -

This InputHandler calls System.console().readPassword(), -available since Java 1.6. On earlier platforms it falls back to the -behavior of DefaultInputHandler. Since Ant 1.7.1.

- -

InputRequest

- -

Instances of org.apache.tools.ant.input.InputRequest -encapsulate the information necessary to ask a user for input and -validate this input.

- -

The instances of InputRequest itself will accept any -input, but subclasses may use stricter validations. -org.apache.tools.ant.input.MultipleChoiceInputRequest -should be used if the user input must be part of a predefined set of -choices.

- - - -- cgit 1.2.3-korg