Package org.lockss.laaws.crawler.impl
Class JobsApiServiceImpl
java.lang.Object
org.lockss.spring.base.BaseSpringApiServiceImpl
org.lockss.laaws.crawler.impl.JobsApiServiceImpl
- All Implemented Interfaces:
JobsApiDelegate
@Service
public class JobsApiServiceImpl
extends BaseSpringApiServiceImpl
implements JobsApiDelegate
-
Nested Class Summary
Nested classes/interfaces inherited from class org.lockss.spring.base.BaseSpringApiServiceImpl
BaseSpringApiServiceImpl.MapMessageListener -
Field Summary
FieldsFields inherited from class org.lockss.spring.base.BaseSpringApiServiceImpl
DEFAULT_CONFIG_WAIT_TIME, DEFAULT_READY_WAIT_TIME, JMS_BOTH, JMS_RECEIVE, JMS_SEND, jmsConsumer, jmsProducer, PARAM_CONFIG_WAIT_TIME, PARAM_READY_WAIT_TIME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<org.lockss.util.rest.crawler.CrawlJob>deleteCrawlJob(String jobId) Deletes a crawl previously added to the crawl queue, stopping the crawl if already running.org.springframework.http.ResponseEntity<Void>Deletes all the currently queued and active crawl requests.org.springframework.http.ResponseEntity<org.lockss.util.rest.crawler.CrawlJob>getCrawlJob(String jobId) Provides the status of a requested crawl.org.springframework.http.ResponseEntity<JobPager>Get all crawl jobsorg.springframework.http.ResponseEntity<org.lockss.util.rest.crawler.CrawlJob>queueJob(org.lockss.util.rest.crawler.CrawlDesc crawlDesc) Requests a crawl.Methods inherited from class org.lockss.spring.base.BaseSpringApiServiceImpl
configMgrCreated, getClassName, getConfigWaitTime, getJMSManager, getPluginManager, getReadyWaitTime, getRunningLockssDaemon, getStateManager, getWaitTime, jmsSetUpDone, jsonResponse, receiveMessage, registerConfigCallback, setUpJms, setUpJms, setUpJms, stopJms, stringResponse, waitConfig, waitConfig, waitReady, waitReadyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.lockss.laaws.crawler.api.JobsApiDelegate
getAcceptHeader, getObjectMapper, getRequest
-
Field Details
-
AU_HAS_QUEUED_OR_ACTIVE_CRAWL
- See Also:
-
-
Constructor Details
-
JobsApiServiceImpl
@Autowired public JobsApiServiceImpl(jakarta.servlet.http.HttpServletRequest request)
-
-
Method Details
-
getJobs
public org.springframework.http.ResponseEntity<JobPager> getJobs(Integer limit, String continuationToken) Get all crawl jobs- Specified by:
getJobsin interfaceJobsApiDelegate- See Also:
-
deleteJobs
Deletes all the currently queued and active crawl requests.- Specified by:
deleteJobsin interfaceJobsApiDelegate- Returns:
- a
ResponseEntity<Void>. - See Also:
-
queueJob
public org.springframework.http.ResponseEntity<org.lockss.util.rest.crawler.CrawlJob> queueJob(org.lockss.util.rest.crawler.CrawlDesc crawlDesc) Requests a crawl.- Specified by:
queueJobin interfaceJobsApiDelegate- Parameters:
crawlDesc- A CrawlDesc with the information about the requested crawl.- Returns:
- a
ResponseEntity<CrawlJob>with the information about the job created to perform the crawl. - See Also:
-
getCrawlJob
public org.springframework.http.ResponseEntity<org.lockss.util.rest.crawler.CrawlJob> getCrawlJob(String jobId) Provides the status of a requested crawl.- Specified by:
getCrawlJobin interfaceJobsApiDelegate- Parameters:
jobId- A String with the identifier assigned to the crawl when added.- Returns:
- a
ResponseEntity<CrawlJob>with the status of the crawl. - See Also:
-
deleteCrawlJob
public org.springframework.http.ResponseEntity<org.lockss.util.rest.crawler.CrawlJob> deleteCrawlJob(String jobId) Deletes a crawl previously added to the crawl queue, stopping the crawl if already running.- Specified by:
deleteCrawlJobin interfaceJobsApiDelegate- Parameters:
jobId- A String with the identifier assigned to the crawl when added.- Returns:
- a
ResponseEntity<CrawlJob>with the status of the deleted crawl. - See Also:
-