|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.harvard.cfa.vo.tapclient.tool.Client
public abstract class Client
A Client command line interface.
Constructor Summary | |
---|---|
protected |
Client(java.lang.String commandLineSyntax,
java.lang.String[] required)
Construct an Client with the default Options. |
Method Summary | |
---|---|
void |
checkRequired()
|
static org.apache.commons.cli.Options |
createOptions()
Returns the options for an availability client. |
java.lang.String |
getBaseName()
Returns the application base name. |
org.apache.commons.cli.CommandLine |
getCommandLine()
Returns the parsed command line. |
java.lang.String |
getCommandLineSyntax()
Returns the application command line syntax. |
java.util.Comparator |
getOptionComparator()
|
org.apache.commons.cli.Options |
getOptions()
Returns the options supported on the command line. |
protected java.io.PrintStream |
getOutput()
Returns the PrintStream to use for output. |
java.lang.String |
getVersion()
Returns the application version. |
boolean |
isVerbose()
Returns true if the verbose flag has been set. |
void |
parse(java.lang.String[] args)
Parser the command line arguments |
protected void |
printHelp()
Writes the usage information to the output stream |
protected void |
printVersion()
Writes the version information to the output stream |
void |
run()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Client(java.lang.String commandLineSyntax, java.lang.String[] required)
createOptions()
Method Detail |
---|
public void parse(java.lang.String[] args) throws org.apache.commons.cli.ParseException
args
- the command line arguments
org.apache.commons.cli.ParseException
- if an error occurs while parsing the command line argumentsgetOptions()
public void checkRequired() throws org.apache.commons.cli.ParseException
org.apache.commons.cli.ParseException
public void run() throws java.io.FileNotFoundException, org.apache.commons.cli.ParseException, HttpException, ResponseFormatException, java.io.IOException
java.io.FileNotFoundException
org.apache.commons.cli.ParseException
HttpException
ResponseFormatException
java.io.IOException
protected void printHelp() throws java.io.FileNotFoundException
java.io.FileNotFoundException
- if an error occurs opening the output file.getOutput()
protected void printVersion() throws java.io.FileNotFoundException
java.io.FileNotFoundException
- if an error occurs opening the output file.getOutput()
public org.apache.commons.cli.Options getOptions()
getCommandLine()
public java.util.Comparator getOptionComparator()
public org.apache.commons.cli.CommandLine getCommandLine()
parse(String[])
public java.lang.String getBaseName()
public java.lang.String getVersion()
public java.lang.String getCommandLineSyntax()
public boolean isVerbose()
getCommandLine()
,
getOptions()
protected java.io.PrintStream getOutput() throws java.io.FileNotFoundException
java.io.FileNotFoundException
- if there is an error opening the file specified by output option.public static org.apache.commons.cli.Options createOptions()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |