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
A servlet that generates a RSS feed from the public news on the BASE server.
- Since:
- 2.17
- Author:
- nicklas
- See Also:
- Last modified
- $Date $
-
Field Summary
Modifier and TypeFieldDescriptionprivate byte[]
private String
private static boolean
private String
private static Date
private static long
private SessionControl
private static final long
private Charset
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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
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
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
lastUpdate
private static long lastUpdate -
lastReset
-
enabled
private static boolean enabled -
host
-
contextPath
-
utf8
-
sc
-
cachedRssNews
private byte[] cachedRssNews
-
-
Constructor Details
-
RssNewsFeed
public RssNewsFeed()
-
-
Method Details
-
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
- Overrides:
init
in classGenericServlet
- Throws:
ServletException
-
doGet
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException - Overrides:
doGet
in classHttpServlet
- Throws:
ServletException
IOException
-
getNewsFeed
Generate the XML string for the news feed.
-