|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sourceforge.java.util.jobs.Job
net.sourceforge.java.feednread.backend.jobs.NewsFeedAggregationManagerJob
Job to control and coordinate the aggregation of a bunch of
Favorites i.e. their associated NewsFeeds.
| Field Summary | |
private int |
activeAggregators
The active aggregator count |
private List |
aggregatorJobs
The list of Jobs used for aggregation |
private boolean |
isError
Error flag: This is set to false if minimum one
NewsFeedAggregatorJob succeeds. |
private MainApplicationWindow |
mainWindow
The Feed'n Read main window |
private IProgressMonitor |
monitor
The IProgressMonitor of the aggregation manager Job
|
private AggregatedNewsFeed |
newsFeed
The AggregatedNewsFeed to aggregate into |
private Favorite[] |
newsFeedFavorites
* The Favorites to aggregate |
| Fields inherited from class net.sourceforge.java.util.jobs.Job |
|
| Fields inherited from interface net.sourceforge.java.util.jobs.IJob |
HIGH_PRIORITY, LOW_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
NewsFeedAggregationManagerJob(MainApplicationWindow mainWindow,
Favorite[] newsFeedFavorites)
Creates a new NewsFeedAggregationManagerJob which
aggregates the specified Favorite newsfeeds into one
single AggregatedNewsFeed and adds it to the
NewsFeedTabBar when finished.
|
|
| Method Summary | |
private void |
aggregationFailed()
Called in case this NewsFeedAggregationManagerJob failed.
|
private void |
aggregationSucceeded()
Called in case this NewsFeedAggregationManagerJob succeeded
and aggregated at least one NewsFeed.
|
void |
cancel()
Cancels this NewsFeedAggregationManagerJob and all sub
NewsFeedAggregatorJobs.
|
void |
completed(NewsFeedAggregatorJob aggregator,
NewsFeed parsedNewsFeed)
Called from a NewsFeedAggregatorJob if it has completed.
|
private void |
initializedAggregatedNewsFeed()
Initializes the target AggregatedNewsFeed which holds all
aggregated news entries.
|
void |
run(IProgressMonitor monitor)
Activates the aggregation process. |
private void |
showResult()
Shows the result of the NewsFeedAggregationManagerJob.
|
void |
spawnNewAggregator(Favorite newsFeedFavorite)
Spawns a new NewsFeedAggregatorJob to parse/aggregate the
specified newsfeed Favorite.
|
| Methods inherited from class net.sourceforge.java.util.jobs.Job |
done, getException, getJobManager, getName, getPriority, getStatus, getThread, isCanceled, join, setException, setJobManager, setName, setPriority, setThread, start, started, statusChanged |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private MainApplicationWindow mainWindow
The Feed'n Read main window
private IProgressMonitor monitor
The IProgressMonitor of the aggregation manager Job
private List aggregatorJobs
The list of Jobs used for aggregation
private Favorite[] newsFeedFavorites
* The Favorites to aggregate
private int activeAggregators
The active aggregator count
private AggregatedNewsFeed newsFeed
The AggregatedNewsFeed to aggregate into
private boolean isError
Error flag: This is set to false if minimum one
NewsFeedAggregatorJob succeeds. The flag is initially set
to true.
| Constructor Detail |
public NewsFeedAggregationManagerJob(MainApplicationWindow mainWindow,
Favorite[] newsFeedFavorites)
Creates a new NewsFeedAggregationManagerJob which
aggregates the specified Favorite newsfeeds into one
single AggregatedNewsFeed and adds it to the
NewsFeedTabBar when finished.
mainWindow - the Feed'n Read main windownewsFeedFavorites - the Favorite newsfeeds to
aggregate| Method Detail |
public void cancel()
Cancels this NewsFeedAggregationManagerJob and all sub
NewsFeedAggregatorJobs.
cancel in interface IJobcancel in class Jobpublic void run(IProgressMonitor monitor)
Activates the aggregation process.
monitor - the IProgressMonitor to use for reporting
the progress of this NewsFeedAggregationManagerJobIRunnableWithProgress.run(org.eclipse.core.runtime.IProgressMonitor),
IJob.getException()private void showResult()
Shows the result of the NewsFeedAggregationManagerJob.
This is the last chance to trigger a cancellation.
private void aggregationSucceeded()
Called in case this NewsFeedAggregationManagerJob succeeded
and aggregated at least one NewsFeed.
A new tab is added to the NewsFeedTabBar showing all
aggregated NewsFeeds.
In addition a success message is shown in the application status line.
private void aggregationFailed()
Called in case this NewsFeedAggregationManagerJob failed.
This only happens if all NewsFeedAggregatorJobs
failed.
An error message is shown in the application status line.
public void spawnNewAggregator(Favorite newsFeedFavorite)
Spawns a new NewsFeedAggregatorJob to parse/aggregate the
specified newsfeed Favorite.
newsFeedFavorite - the Favorite newsfeed to
parse/aggregate
public void completed(NewsFeedAggregatorJob aggregator,
NewsFeed parsedNewsFeed)
Called from a NewsFeedAggregatorJob if it has completed.
It may have succeded or failed. The NewsFeedAggregatorJob
is removed from this NewsFeedAggregationManagerJob and the
progress status of the aggregation process is reported.
aggregator - the NewsFeedAggregatorJob that completedparsedNewsFeed - the NewsFeed parsed by the
specified NewsFeedAggregatorJob; null if
the NewsFeedAggregatorJob failedprivate void initializedAggregatedNewsFeed()
Initializes the target AggregatedNewsFeed which holds all
aggregated news entries.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||