net.sf.basedb.clients.web.servlet
Class RssNewsFeed
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
net.sf.basedb.clients.web.servlet.RssNewsFeed
- All Implemented Interfaces:
- Serializable, Servlet, ServletConfig
public class RssNewsFeed
- extends HttpServlet
A servlet that generates a RSS feed from the public news on the BASE server.
- Since:
- 2.17
- Author:
- nicklas
- See Also:
- Serialized Form
- Last modified
- $Date $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
lastUpdate
private static long lastUpdate
lastReset
private static Date lastReset
enabled
private static boolean enabled
host
private String host
contextPath
private String contextPath
utf8
private Charset utf8
sc
private SessionControl sc
cachedRssNews
private byte[] cachedRssNews
RssNewsFeed
public RssNewsFeed()
reset
public static void reset()
- Reset the feed and force it to regenerate it's content.
It is recommended that this method is called whenever
a news items is added or modified. If not, the cache will
expire sooner or later in any case.
isEnabled
public static boolean isEnabled()
- Check if the rss servlet has been enabled or not.
init
public void init()
throws ServletException
- Overrides:
init
in class GenericServlet
- Throws:
ServletException
doGet
protected void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
- Overrides:
doGet
in class HttpServlet
- Throws:
ServletException
IOException
getNewsFeed
private String getNewsFeed(String rootUrl,
boolean debug)
- Generate the XML string for the news feed.