|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.harvester.distribute.HarvesterMessageHandler
dk.netarkivet.harvester.harvesting.monitor.HarvestMonitorServer
public class HarvestMonitorServer
Listens for CrawlProgressMessage
s on the proper JMS channel, and
stores information to be presented in the monitoring console.
Field Summary | |
---|---|
static ChannelID |
CRAWL_PROGRESS_CHANNEL_ID
The JMS channel on which to listen for CrawlProgressMessage s. |
static ChannelID |
FRONTIER_CHANNEL_ID
The JMS channel on which to listen for FrontierReportMessage s. |
Method Summary | |
---|---|
void |
cleanup()
Close down the HarvestMonitorServer singleton. |
static int |
getAutoRefreshDelay()
Returns the delay in seconds after which a harvest monitor webpage should refresh itself. |
java.lang.String |
getChartFilePath(long jobId)
Returns the path of the chart image file, relative to the webapp directory. |
InMemoryFrontierReport |
getFrontierExhaustedQueues(long jobId)
Retrieves the latest frontier extract report stored for the given job ID, that contains only exhausted queues. |
InMemoryFrontierReport |
getFrontierReport(long jobId)
Retrieves the latest frontier report stored for the given job ID. |
InMemoryFrontierReport |
getFrontierRetiredQueues(long jobId)
Retrieves the latest frontier extract report stored for the given job ID, that contains only retired queues. |
static HarvestMonitorServer |
getInstance()
|
static StartedJobInfo |
getMostRecentRunningJobInfo(long jobId)
Returns the most recent running job info record available for the given job ID. |
static StartedJobInfo[] |
getMostRecentRunningJobInfos(long jobId)
Returns a configurable number of the most recent running job info records available for the given job ID. |
void |
setChartLocale(long jobId,
java.util.Locale loc)
Sets the chart generator locale. |
void |
visit(CrawlProgressMessage msg)
This method should be overridden and implemented by a sub class if message handling is wanted. |
void |
visit(FrontierReportMessage msg)
This method should be overridden and implemented by a sub class if message handling is wanted. |
void |
visit(JobEndedMessage msg)
Cleans up the database on transitions to status DONE and FAILED. |
Methods inherited from class dk.netarkivet.harvester.distribute.HarvesterMessageHandler |
---|
onMessage, visit, visit |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.jms.MessageListener |
---|
onMessage |
Field Detail |
---|
public static final ChannelID CRAWL_PROGRESS_CHANNEL_ID
CrawlProgressMessage
s.
public static final ChannelID FRONTIER_CHANNEL_ID
FrontierReportMessage
s.
Method Detail |
---|
public void cleanup()
cleanup
in interface CleanupIF
CleanupIF.cleanup()
public static HarvestMonitorServer getInstance()
public void visit(CrawlProgressMessage msg)
HarvesterMessageHandler
visit
in interface HarvesterMessageVisitor
visit
in class HarvesterMessageHandler
msg
- a CrawlProgressMessage
public void visit(JobEndedMessage msg)
visit
in interface HarvesterMessageVisitor
visit
in class HarvesterMessageHandler
msg
- a JobEndedMessage
public static final int getAutoRefreshDelay()
HarvesterSettings.HARVEST_MONITOR_REFRESH_INTERVAL
property.
public static StartedJobInfo[] getMostRecentRunningJobInfos(long jobId)
jobId
-
HarvesterSettings.HARVEST_MONITOR_DISPLAYED_HISTORY_SIZE
public static StartedJobInfo getMostRecentRunningJobInfo(long jobId)
jobId
-
public void visit(FrontierReportMessage msg)
HarvesterMessageHandler
visit
in interface HarvesterMessageVisitor
visit
in class HarvesterMessageHandler
msg
- a FrontierReportMessage
public InMemoryFrontierReport getFrontierReport(long jobId)
jobId
- the job id
public InMemoryFrontierReport getFrontierRetiredQueues(long jobId)
jobId
- the job id
public InMemoryFrontierReport getFrontierExhaustedQueues(long jobId)
jobId
- the job id
public java.lang.String getChartFilePath(long jobId)
jobId
- the job id
public void setChartLocale(long jobId, java.util.Locale loc)
jobId
- the job IDloc
- the local identifier, e.g. 'fr', 'dk', etc.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |