|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.exolab.jmscts.tools.MessagingCommand
Messaging tool command parser
Field Summary | |
protected static java.lang.String |
CONFIG
The short name for the provider configuration argument |
protected static java.lang.String |
CONFIG_LONG
The long name for the provider configuration argument |
protected static java.lang.String |
COUNT
The short name for the count argument |
protected static java.lang.String |
COUNT_LONG
The long name for the count argument |
protected static java.lang.String |
DESTINATION
The short name for the destination argument |
protected static java.lang.String |
DESTINATION_LONG
The long name for the destination argument |
protected static java.lang.String |
FACTORY
The short name for the factory argument |
protected static java.lang.String |
FACTORY_LONG
The long name for the factory argument |
protected static java.lang.String |
VERBOSE
The short name for the verbose argument |
protected static java.lang.String |
VERBOSE_LONG
The long name for the verbose argument |
Constructor Summary | |
MessagingCommand()
Construct a new MessagingCommand |
Method Summary | |
protected abstract MessagingTool |
create()
Create the messaging tool |
protected java.lang.String |
getHome()
Returns the value of the jmscts.home system property,
defaulting to the value of user.dir if its not set |
protected org.apache.commons.cli.Options |
getOptions()
Returns the command line arguments |
protected abstract java.lang.String |
getUsage()
Returns the command usage |
void |
invoke(java.lang.String[] args)
Invoke the command |
protected void |
parse(MessagingTool tool,
org.apache.commons.cli.CommandLine commands)
Parse the command line, populating the tool |
protected void |
usage(org.apache.commons.cli.Options options,
java.lang.String message)
Prints the usage for the command, and exits with an error code |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final java.lang.String CONFIG
protected static final java.lang.String CONFIG_LONG
protected static final java.lang.String FACTORY
protected static final java.lang.String FACTORY_LONG
protected static final java.lang.String DESTINATION
protected static final java.lang.String DESTINATION_LONG
protected static final java.lang.String COUNT
protected static final java.lang.String COUNT_LONG
protected static final java.lang.String VERBOSE
protected static final java.lang.String VERBOSE_LONG
Constructor Detail |
public MessagingCommand()
MessagingCommand
Method Detail |
public void invoke(java.lang.String[] args) throws java.lang.Exception
args
- the command line argumentsjava.lang.Exception
- for any errorprotected abstract MessagingTool create()
protected void parse(MessagingTool tool, org.apache.commons.cli.CommandLine commands) throws org.apache.commons.cli.ParseException
tool
- the messaging toolcommands
- the command lineorg.apache.commons.cli.ParseException
- if the command line cannot be parsedprotected org.apache.commons.cli.Options getOptions()
protected abstract java.lang.String getUsage()
protected void usage(org.apache.commons.cli.Options options, java.lang.String message)
options
- the command line optionsmessage
- message to display before the usage. May be
null
protected java.lang.String getHome()
jmscts.home
system property,
defaulting to the value of user.dir
if its not setjmscts.home
system property
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |