Package de.jetwick.snacktory

Examples of de.jetwick.snacktory.HtmlFetcher


        installLastSearches();
        installTwitterModule();
        installSearchModule();
        installRMIModule();

        HtmlFetcher fetcher = createHtmlFetcher();
        if (fetcher != null)
            bind(HtmlFetcher.class).toInstance(fetcher);

        GenericUrlResolver urlResolver = createGenericUrlResolver();
        if (urlResolver != null)
View Full Code Here


//        bind(TweetProducer.class).to(TweetProducerOffline.class);
        bind(TweetProducer.class).to(TweetProducerViaSearch.class);
    }

    public HtmlFetcher createHtmlFetcher() {
        HtmlFetcher fetcher = new HtmlFetcher();
        fetcher.setMaxTextLength(JTweet.MAX_LENGTH);
        return fetcher;
    }
View Full Code Here

        twTestSearch.tearDown();
    }

    @Test
    public void testResolve() throws InterruptedException {
        HtmlFetcher fetcher = new HtmlFetcher() {

            @Override
            public String getResolvedUrl(String urlAsString, int timeout) {
                return urlAsString + "_r";
            }
View Full Code Here

        assertNotNull(twSearch.findByUrl("http://hiho.de_r").get(0));       
    }

    @Test
    public void testResolveProblem() throws InterruptedException {
        HtmlFetcher fetcher = new HtmlFetcher() {

            @Override
            public String getResolvedUrl(String urlAsString, int timeout) {
                return urlAsString + "_r";
            }
View Full Code Here

//        assertEquals(0, resolver.getCheckAgainSize());
    }

    @Test
    public void testAlreadyExistentSameId() throws InterruptedException {
        HtmlFetcher fetcher = new HtmlFetcher() {

            @Override
            public String getResolvedUrl(String urlAsString, int timeout) {
                return urlAsString + "_r";
            }
View Full Code Here

                return urlResolver;
            }

            @Override
            public HtmlFetcher createHtmlFetcher() {
                return new HtmlFetcher() {

                    @Override
                    public JResult fetchAndExtract(String url, int timeout, boolean resolve) throws Exception {
                        return UrlEntry.createSimpleResult(url);
                    }
View Full Code Here

TOP

Related Classes of de.jetwick.snacktory.HtmlFetcher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.