/** * Sends a JMS message over the statusUpdateChannel indicating that the specified job has * completed. * * @param jobID * @param url */ public void sendJobComplete(String jobID, String url) { try { JMSSender qsender = msgService.getJMSSender(statusUpdateChannel); SubmissionJobCompleteMsg msg = new SubmissionJobCompleteMsg(qsender, jobID, url, 0); msg.send(); } catch (JMSException e) { e.printStackTrace(); } } // - sendJobComplete
/** * Sends a JMS message over the statusUpdateChannel indicating the status of a crawled resource. * * @param jobID - the unique job name from the original submission message. * @param uri - the URI that was crawled. * @param status - status code. */ public void sendStatusUpdate(String jobID, String uri, int status) { try { JMSSender qsender = msgService.getJMSSender(statusUpdateChannel); UrlCrawledMsg msg = new UrlCrawledMsg(qsender, jobID, uri, status); msg.send(); } catch (JMSException e) { e.printStackTrace(); } } // - sendStatusUpdate
/** * Sends a JMS message over the ingestionChannel indicating that new resources are ready to * ingest. * * @param jobID - the unique job name from the original submission message. * @param filePath - relative path from repository root where the file can be found. * @param metaPath - relative path from the repository root where the metadata file can be found. * @param type - resource type (from CSXConstants). */ public void notifyIngestion(String jobID, String filePath, String metaPath, String type) { try { JMSSender qsender = msgService.getJMSSender(ingestionChannel); NewRecordToIngestMsg msg = new NewRecordToIngestMsg(qsender, jobID, repositoryID, filePath, metaPath, type); msg.send(); } catch (JMSException e) { e.printStackTrace(); } } // - notifyIngestion
/** * Sends a JMS message over the statusUpdateChannel indicating that the specified job has started. * * @param jobID * @param url */ public void sendJobStarted(String jobID, String url) { try { System.err.println("SENDING JOB STARTED!!!"); JMSSender qsender = msgService.getJMSSender(statusUpdateChannel); SubmissionStartedMsg msg = new SubmissionStartedMsg(qsender, jobID, url, 0); msg.send(); } catch (JMSException e) { e.printStackTrace(); } } // - sendJobStarted