twitter4j.examples
Class FeedMonitor

java.lang.Object
  extended by twitter4j.examples.FeedMonitor

public class FeedMonitor
extends java.lang.Object

FeedMonitor is a simple feed monitoring application.
FeedMonitor monitors specified feeds and reports newly posted entries to the specified Twitter account every 10 minutes.
It is possible to specify multiple configuration files.
Numeric parameter will be recognized as monitoring interverval in minutes.
Usage: java twitter4j.examples.FeedMonitor [config_file_path ..] [interval(min)]

If no configuration file path is specified, FeedMonitor will look for default configuration file name - "feedmonitor.properties".
The configuration file format is Java standard properties file format with following properties:
feedurl : the feed URL you want to monitor
id : Twitter id
password : Twitter password


e.g. a sample properties for monitoring CSS latest news every 10 minutes
 feedurl=http://rss.cnn.com/rss/cnn_latest.rss
 id=YOUR_TWITTER_ID
 password=YOUR_TWITTER_PASSWORD

Author:
Yusuke Yamamoto - yusuke at mac.com

Field Summary
private  java.lang.String feedurl
           
private  java.lang.String fileName
           
private  HttpClient http
           
private  java.util.Date lastUpdate
           
(package private) static Logger log
           
private  java.util.Properties prop
           
private  Twitter twitter
           
 
Constructor Summary
FeedMonitor(java.lang.String fileName)
           
 
Method Summary
private  void check()
           
static void main(java.lang.String[] args)
          Main entry point for this application.
If config_file_path is not specified, feedmonitor.properties will be used.
Usage: java twitter4j.examples.FeedMonitor [config_file_path ..] [interval(min)]
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

static Logger log

prop

private java.util.Properties prop

feedurl

private java.lang.String feedurl

twitter

private Twitter twitter

http

private HttpClient http

lastUpdate

private java.util.Date lastUpdate

fileName

private java.lang.String fileName
Constructor Detail

FeedMonitor

public FeedMonitor(java.lang.String fileName)
Method Detail

main

public static void main(java.lang.String[] args)
Main entry point for this application.
If config_file_path is not specified, feedmonitor.properties will be used.
Usage: java twitter4j.examples.FeedMonitor [config_file_path ..] [interval(min)]


check

private void check()