Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 41 for ResponseData (0.13 sec)

  1. fess-crawler/src/main/java/org/codelibs/fess/crawler/entity/ResponseData.java

    import java.util.Set;
    
    import org.codelibs.core.exception.IORuntimeException;
    import org.codelibs.core.io.FileUtil;
    import org.codelibs.fess.crawler.Constants;
    
    /**
     * @author shinsuke
     *
     */
    public class ResponseData implements Closeable {
    
        private String url;
    
        private int httpStatusCode;
    
        private String charSet;
    
        private long contentLength;
    
        private String mimeType;
    
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Sat Oct 12 01:40:57 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  2. fess-crawler/src/test/java/org/codelibs/fess/crawler/rule/impl/SitemapsRuleTest.java

            final ResponseData responseData = new ResponseData();
            responseData.setUrl("http://example.com/test.xml");
            File file = ResourceUtil.getResourceAsFile("sitemaps/sitemap1.xml");
            responseData.setResponseBody(file, false);
            return responseData;
        }
    
        private ResponseData getTestData2_FAIL() {
            final ResponseData responseData = new ResponseData();
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  3. fess-crawler/src/main/java/org/codelibs/fess/crawler/processor/impl/DefaultResponseProcessor.java

            }
        }
    
        protected boolean isSuccessful(final ResponseData responseData) {
            if (successfulHttpCodes == null) {
                return true;
            }
            final int httpStatusCode = responseData.getHttpStatusCode();
            for (final int code : successfulHttpCodes) {
                if (code == httpStatusCode) {
                    return true;
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:47:32 UTC 2024
    - 9K bytes
    - Viewed (0)
  4. fess-crawler/src/test/java/org/codelibs/fess/crawler/client/http/HcHttpClientTest.java

        // for (String url : urls) {
        // ResponseData responseData = httpClient.doGet(url);
        // // assertEquals(200, responseData.getHttpStatusCode());
        // if (responseData.getHttpStatusCode() != 200) {
        // return responseData;
        // }
        // }
        // return null;
        // }
        // });
        // }
        // List<Future<ResponseData>> futureList = executorService.invokeAll(list);
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu May 09 09:28:25 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  5. fess-crawler/src/main/java/org/codelibs/fess/crawler/transformer/impl/TextTransformer.java

         * (non-Javadoc)
         *
         * @see
         * org.codelibs.fess.crawler.transformer.impl.AbstractTransformer#transform(org.fess.crawler.entity.ResponseData)
         */
        @Override
        public ResultData transform(final ResponseData responseData) {
            if (responseData == null || !responseData.hasResponseBody()) {
                throw new CrawlingAccessException("No response body.");
            }
    
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:47:32 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/fess/crawler/processor/FessResponseProcessor.java

            }
        }
    
        @Override
        protected AccessResult<?> createAccessResult(final ResponseData responseData, final ResultData resultData) {
            return super.createAccessResult(responseData, ingest(responseData, resultData));
        }
    
        private ResultData ingest(final ResponseData responseData, final ResultData resultData) {
            if (ingestFactory == null) {
                return resultData;
            }
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:53:18 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  7. fess-crawler/src/main/java/org/codelibs/fess/crawler/client/AbstractCrawlerClient.java

        }
    
        protected void checkMaxContentLength(final ResponseData responseData) {
            if (maxContentLength != null && responseData.getContentLength() > maxContentLength.longValue()) {
                throw new MaxLengthExceededException("The content length (" + responseData.getContentLength() + " byte) is over "
                        + maxContentLength.longValue() + " byte. The url is " + responseData.getUrl());
            }
        }
    
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:47:32 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  8. fess-crawler/src/test/java/org/codelibs/fess/crawler/rule/impl/RuleManagerImplTest.java

            responseData.setResponseBody(file, false);
            final Rule rule = ruleManager.getRule(responseData);
            assertNotNull(rule);
            assertEquals("sitemapsRule", rule.getRuleId());
            CloseableUtil.closeQuietly(responseData);
        }
    
        public void test_getRule_sitemaps2() {
            final ResponseData responseData = new ResponseData();
            responseData.setUrl("http://www.example.com/sitemap1.xml.gz");
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  9. fess-crawler/src/test/java/org/codelibs/fess/crawler/client/AbstractCrawlerClientTest.java

            };
            ResponseData responseData = new ResponseData();
            responseData.setUrl("http://test.com/");
    
            client.checkMaxContentLength(responseData);
    
            responseData.setContentLength(-1);
            client.checkMaxContentLength(responseData);
    
            responseData.setContentLength(1000L);
            client.checkMaxContentLength(responseData);
    
            responseData.setContentLength(1000000L);
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 3K bytes
    - Viewed (0)
  10. fess-crawler/src/test/java/org/codelibs/fess/crawler/processor/impl/DefaultResponseProcessorTest.java

            ResponseData responseData = new ResponseData();
            responseData.setHttpStatusCode(200);
            assertTrue(processor.isSuccessful(responseData));
    
            responseData.setHttpStatusCode(100);
            assertFalse(processor.isSuccessful(responseData));
            responseData.setHttpStatusCode(304);
            assertFalse(processor.isSuccessful(responseData));
            responseData.setHttpStatusCode(404);
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 2.3K bytes
    - Viewed (0)
Back to top