KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > syndication > fetcher > FetcherEvent


1 package com.sun.syndication.fetcher;
2
3 import java.util.EventObject JavaDoc;
4
5 import com.sun.syndication.feed.synd.SyndFeed;
6
7 /**
8  * @author nl
9  *
10  */

11 public class FetcherEvent extends EventObject JavaDoc {
12     public static final String JavaDoc EVENT_TYPE_FEED_POLLED = "FEED_POLLED";
13     public static final String JavaDoc EVENT_TYPE_FEED_RETRIEVED = "FEED_RETRIEVED";
14     public static final String JavaDoc EVENT_TYPE_FEED_UNCHANGED = "FEED_UNCHANGED";
15     
16     private String JavaDoc eventType;
17     private String JavaDoc urlString;
18     private SyndFeed feed;
19     
20     public FetcherEvent(Object JavaDoc source) {
21         super(source);
22     }
23
24
25     public FetcherEvent(Object JavaDoc source, String JavaDoc urlStr, String JavaDoc eventType) {
26         this(source);
27         setUrlString(urlStr);
28         setEventType(eventType);
29     }
30
31     public FetcherEvent(Object JavaDoc source, String JavaDoc urlStr, String JavaDoc eventType, SyndFeed feed) {
32         this(source, urlStr, eventType);
33         setFeed(feed);
34     }
35     
36     
37     /**
38      * @return Returns the feed.
39      *
40      * <p>The feed will only be set if the eventType is EVENT_TYPE_FEED_RETRIEVED</p>
41      */

42     public SyndFeed getFeed() {
43         return feed;
44     }
45     
46     /**
47      * @param feed The feed to set.
48      *
49      * <p>The feed will only be set if the eventType is EVENT_TYPE_FEED_RETRIEVED</p>
50      */

51     public void setFeed(SyndFeed feed) {
52         this.feed = feed;
53     }
54     
55     /**
56      * @return Returns the eventType.
57      */

58     public String JavaDoc getEventType() {
59         return eventType;
60     }
61     /**
62      * @param eventType The eventType to set.
63      */

64     public void setEventType(String JavaDoc eventType) {
65         this.eventType = eventType;
66     }
67     /**
68      * @return Returns the urlString.
69      */

70     public String JavaDoc getUrlString() {
71         return urlString;
72     }
73     /**
74      * @param urlString The urlString to set.
75      */

76     public void setUrlString(String JavaDoc urlString) {
77         this.urlString = urlString;
78     }
79 }
80
Popular Tags