Class AsadminInput

java.lang.Object
org.glassfish.common.util.admin.AsadminInput

public class AsadminInput extends Object
Implements in one place the details of providing data to asadmin's System.in and consuming it.

Primarily (but not exclusively) for security reasons, it is useful to be able to have asadmin read data from its System.in. This class provides the logic to do so consistently. It also provides a little help for writing data to a stream such that it will be acceptable as input.

The input stream must have the following format:

 version=some-version-value
 (lines as expected by the specified version)
 

Currently there is only one version supported. The lines following the version spec must be in the format of a properties file, with the convention that each property name is (category).(property-within-category)=value The AsadminInput.InputReader returned will return a Map<String,Properties> from its AsadminInput.InputReader.settings() method. The map will contain one entry for each category in the input, and the associated Properties object will map each property-within-category to its value.

Author:
Tim Quinn