Package org.ametys.plugins.syndication
Class FeedCache.FeedLoadWorker
- java.lang.Object
-
- org.ametys.plugins.syndication.FeedCache.FeedLoadWorker
-
- All Implemented Interfaces:
Runnable
- Enclosing class:
- FeedCache
protected class FeedCache.FeedLoadWorker extends Object implements Runnable
Runnable loading an URL into the cache.
-
-
Field Summary
Fields Modifier and Type Field Description private CountDownLatch
_endSignal
private String
_feedUrl
protected boolean
_initialized
Is the engine initialized ?protected Logger
_logger
The logger.
-
Constructor Summary
Constructors Constructor Description FeedLoadWorker(String feedUrl, CountDownLatch endSignal)
Build a worker loading a specific feed.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_checkInitialization()
Check the initialization and throw an exception if not initialized.protected void
_dispose()
Dispose of the resources and looked-up components.void
initialize(Logger logger)
Initialize the feed loader.void
run()
-
-
-
Field Detail
-
_initialized
protected boolean _initialized
Is the engine initialized ?
-
_endSignal
private final CountDownLatch _endSignal
-
-
Constructor Detail
-
FeedLoadWorker
FeedLoadWorker(String feedUrl, CountDownLatch endSignal)
Build a worker loading a specific feed.- Parameters:
feedUrl
- the feed to load.endSignal
- the signal when done.
-
-
Method Detail
-
initialize
public void initialize(Logger logger) throws ContextException, ServiceException
Initialize the feed loader.- Parameters:
logger
- the logger.- Throws:
ContextException
- if the context is badly formedServiceException
- if somthing goes wrong with the service
-
_checkInitialization
protected void _checkInitialization()
Check the initialization and throw an exception if not initialized.
-
_dispose
protected void _dispose()
Dispose of the resources and looked-up components.
-
-