use of org.codelibs.fess.exception.ContentNotFoundException in project fess by codelibs.
the class FessCrawlerThread method processResponse.
@Override
protected void processResponse(final UrlQueue<?> urlQueue, final ResponseData responseData) {
super.processResponse(urlQueue, responseData);
FessConfig fessConfig = ComponentUtil.getFessConfig();
if (fessConfig.isCrawlerFailureUrlStatusCodes(responseData.getHttpStatusCode())) {
String sessionId = crawlerContext.getSessionId();
final CrawlingConfig crawlingConfig = ComponentUtil.getCrawlingConfigHelper().get(sessionId);
final String url = urlQueue.getUrl();
final FailureUrlService failureUrlService = ComponentUtil.getComponent(FailureUrlService.class);
failureUrlService.store(crawlingConfig, ContentNotFoundException.class.getCanonicalName(), url, new ContentNotFoundException(url));
}
}
Aggregations