This commit is contained in:
2012-07-19 18:04:31 +02:00
parent 9573d700f1
commit ae45a329ae
2 changed files with 9 additions and 7 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>WebCallerID</groupId> <groupId>WebCallerID</groupId>
<artifactId>WebCallerID</artifactId> <artifactId>WebCallerID</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>1.0.1</version>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>log4j</groupId> <groupId>log4j</groupId>
@@ -29,6 +29,12 @@ import com.martiansoftware.jsap.JSAPResult;
import com.martiansoftware.jsap.Switch; import com.martiansoftware.jsap.Switch;
import com.martiansoftware.jsap.UnflaggedOption; import com.martiansoftware.jsap.UnflaggedOption;
/**
* This class retrieves the list of missed calls from a Speedport W 723V (A)
* router and sends notifications to a list of e-mail addresses.
*
* @author Tilman Liero tliero@gmx.net
*/
public class CallerIdClient { public class CallerIdClient {
private final static Logger log = Logger.getLogger(CallerIdClient.class); private final static Logger log = Logger.getLogger(CallerIdClient.class);
@@ -216,12 +222,9 @@ public class CallerIdClient {
transport.close(); transport.close();
} }
/**
* @param args
*/
public static void main(String[] args) { public static void main(String[] args) {
BasicConfigurator.configure(new ConsoleAppender(new PatternLayout("%d{ISO8601} - %m%n"))); BasicConfigurator.configure(new ConsoleAppender(new PatternLayout("%d{ISO8601} - %m%n")));
log.info("Starting CallerIdClient version 1.0.0"); log.info("Starting CallerIdClient version 1.0.1");
JSAP jsap = new JSAP(); JSAP jsap = new JSAP();
@@ -236,7 +239,7 @@ public class CallerIdClient {
updateInterval.setHelp("the interval beetween runs in minutes"); updateInterval.setHelp("the interval beetween runs in minutes");
jsap.registerParameter(updateInterval); jsap.registerParameter(updateInterval);
UnflaggedOption smtpServer = new UnflaggedOption("SMTP server address").setStringParser(JSAP.INETADDRESS_PARSER) UnflaggedOption smtpServer = new UnflaggedOption("SMTP server address").setStringParser(JSAP.STRING_PARSER)
.setRequired(true); .setRequired(true);
smtpServer.setHelp("the SMTP server to send notifications with"); smtpServer.setHelp("the SMTP server to send notifications with");
jsap.registerParameter(smtpServer); jsap.registerParameter(smtpServer);
@@ -290,5 +293,4 @@ public class CallerIdClient {
new CallerIdClient(config); new CallerIdClient(config);
} }
} }