org.apache.wiki.rss
Class RSSThread

java.lang.Object
  extended by java.lang.Thread
      extended by org.apache.wiki.WikiBackgroundThread
          extended by org.apache.wiki.rss.RSSThread
All Implemented Interfaces:
Runnable, EventListener, WikiEventListener

public class RSSThread
extends WikiBackgroundThread

Runs the RSS generation thread. FIXME: MUST be somewhere else, this is not a good place.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
RSSThread(WikiEngine engine, File rssFile, int rssInterval)
          Create a new RSS thread.
 
Method Summary
 void backgroundTask()
          Runs the RSS generator thread.
 void startupTask()
          Executes a task just after the thread's Thread.run() method starts, but before the WikiBackgroundThread.backgroundTask() task executes.
 
Methods inherited from class org.apache.wiki.WikiBackgroundThread
actionPerformed, getEngine, run, shutdown, shutdownTask
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RSSThread

public RSSThread(WikiEngine engine,
                 File rssFile,
                 int rssInterval)
Create a new RSS thread.

Parameters:
engine - A WikiEngine to own this thread.
rssFile - A File to write the RSS data to.
rssInterval - How often the RSS should be generated.
Method Detail

startupTask

public void startupTask()
                 throws Exception
Executes a task just after the thread's Thread.run() method starts, but before the WikiBackgroundThread.backgroundTask() task executes. By default, this method does nothing; override it to implement custom functionality.

Overrides:
startupTask in class WikiBackgroundThread
Throws:
Exception - Any exception can be thrown.

backgroundTask

public void backgroundTask()
                    throws Exception
Runs the RSS generator thread. If a previous RSS generation operation encountered a file I/O or other error, this method will turn off generation. false.

Specified by:
backgroundTask in class WikiBackgroundThread
Throws:
Exception - All exceptions are thrown upwards.
See Also:
Thread.run()


Copyright © {inceptionYear}-2014 The Apache Software Foundation. All rights reserved.