org.apache.jetspeed.daemon.impl
Class FeedDaemon

java.lang.Object
  extended byorg.apache.jetspeed.daemon.impl.FeedDaemon
All Implemented Interfaces:
Daemon, java.lang.Runnable

public class FeedDaemon
extends java.lang.Object
implements Daemon

A daemon that parses out Jetspeed content sources. It also handles multiple updating Feeds within PortletFactory. When it encounters any RSS feeds that are remote it will pull them locally into the JetspeedDiskCache class via the bulkdownloader class.

The major goals of this Daemon are:

Version:
$Id: FeedDaemon.java,v 1.42 2004/02/23 02:48:05 jford Exp $
Author:
Kevin A. Burton, Santiago Gala

Field Summary
static java.lang.String TEMP_DIRECTORY
           
static java.lang.String TEMP_FILE_KEY
           
 
Fields inherited from interface org.apache.jetspeed.daemon.Daemon
RESULT_FAILED, RESULT_PROCESSING, RESULT_SUCCESS, RESULT_UNKNOWN, STATUS_NOT_PROCESSED, STATUS_NOT_STARTED, STATUS_PROCESSED, STATUS_PROCESSING, STATUS_STARTED, STATUS_UNKNOWN
 
Constructor Summary
FeedDaemon()
           
 
Method Summary
static int getCount()
          Get the feed count.
 DaemonConfig getDaemonConfig()
          Require that Daemons have a getter for the DaemonConfig
 DaemonEntry getDaemonEntry()
          Get the entry for this daemon.
static java.io.Reader getEntries(java.lang.String url)
          Get the PML for the given URL
static Feed[] getFeeds()
          Get the feeds that are available to Jetspeed
 java.lang.String getMessage()
          Provided so that a Daemon can provide a message to users.
 int getResult()
           Get the result of this daemons processing.
 int getStatus()
          Return the status for this Daemon
 void init(DaemonConfig config, DaemonEntry entry)
          Init this Daemon from the DaemonFactory
 void run()
           
 void setResult(int result)
          Force the result of this Daemon
 void setStatus(int status)
          Set the status for this Daemon
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEMP_FILE_KEY

public static final java.lang.String TEMP_FILE_KEY
See Also:
Constant Field Values

TEMP_DIRECTORY

public static java.lang.String TEMP_DIRECTORY
Constructor Detail

FeedDaemon

public FeedDaemon()
Method Detail

getCount

public static int getCount()
Get the feed count.


getFeeds

public static Feed[] getFeeds()
Get the feeds that are available to Jetspeed


run

public void run()
Specified by:
run in interface java.lang.Runnable

getEntries

public static final java.io.Reader getEntries(java.lang.String url)
                                       throws java.lang.Exception
Get the PML for the given URL

Throws:
java.lang.Exception

init

public void init(DaemonConfig config,
                 DaemonEntry entry)
Init this Daemon from the DaemonFactory

Specified by:
init in interface Daemon

getDaemonConfig

public DaemonConfig getDaemonConfig()
Description copied from interface: Daemon
Require that Daemons have a getter for the DaemonConfig

Specified by:
getDaemonConfig in interface Daemon

getDaemonEntry

public DaemonEntry getDaemonEntry()
Description copied from interface: Daemon
Get the entry for this daemon.

Specified by:
getDaemonEntry in interface Daemon

getStatus

public int getStatus()
Return the status for this Daemon

Specified by:
getStatus in interface Daemon
See Also:
Daemon.STATUS_NOT_PROCESSED, Daemon.STATUS_PROCESSED, Daemon.STATUS_PROCESSING

setStatus

public void setStatus(int status)
Set the status for this Daemon

Specified by:
setStatus in interface Daemon
See Also:
Daemon.STATUS_NOT_PROCESSED, Daemon.STATUS_PROCESSED, Daemon.STATUS_PROCESSING

getResult

public int getResult()
Description copied from interface: Daemon

Get the result of this daemons processing. All Daemon implementations are responsible for defining this.

The default for this should be RESULT_UNKNOWN. This usually means that this daemon has never been called for processing.

Specified by:
getResult in interface Daemon
See Also:
Daemon.getResult()

setResult

public void setResult(int result)
Description copied from interface: Daemon
Force the result of this Daemon

Specified by:
setResult in interface Daemon
See Also:
Daemon.setResult(int result)

getMessage

public java.lang.String getMessage()
Description copied from interface: Daemon
Provided so that a Daemon can provide a message to users. Null if it has nothing to give to the user.

Specified by:
getMessage in interface Daemon
See Also:
Daemon.getMessage()


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.