2.17.2: 2011-06-17

net.sf.basedb.clients.web.servlet
Class RssNewsFeed

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by 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 $

Field Summary
private  byte[] cachedRssNews
           
private  String contextPath
           
private static boolean enabled
           
private  String host
           
private static Date lastReset
           
private static long lastUpdate
           
private  SessionControl sc
           
private static long serialVersionUID
           
private  Charset utf8
           
 
Constructor Summary
RssNewsFeed()
           
 
Method Summary
protected  void doGet(HttpServletRequest request, HttpServletResponse response)
           
private  String getNewsFeed(String rootUrl, boolean debug)
          Generate the XML string for the news feed.
 void init()
           
static boolean isEnabled()
          Check if the rss servlet has been enabled or not.
static void reset()
          Reset the feed and force it to regenerate it's content.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

RssNewsFeed

public RssNewsFeed()
Method Detail

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.


2.17.2: 2011-06-17