Package org.apache.wiki.rss

# Class RSSThread

java.lang.Object
java.lang.Thread
org.apache.wiki.WikiBackgroundThread
org.apache.wiki.rss.RSSThread

All Implemented Interfaces:
  `Runnable`, `EventListener`, `org.apache.wiki.event.WikiEventListener`

public class RSSThread extends WikiBackgroundThread
Runs the RSS generation thread.

## 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

Constructors
Constructor
Description
`RSSThread(org.apache.wiki.api.core.Engine engine, File rssFile, int rssInterval)`
Create a new RSS thread.

## Method Summary

Modifier and Type
Method
Description
`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, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield`

### Methods inherited from class java.lang.Object

`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### RSSThread

public RSSThread(org.apache.wiki.api.core.Engine engine, File rssFile, int rssInterval)
Create a new RSS thread.

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

## Method Details

### startupTask

public void startupTask()
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`

### 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()`