org.apache.cocoon.components.crawler
Interface CocoonCrawler

All Superinterfaces:
Component
All Known Implementing Classes:
SimpleCocoonCrawlerImpl

public interface CocoonCrawler
extends Component

The avalon behavioural component interface of crawling.

Version:
CVS $Id: CocoonCrawler.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Bernhard Huber

Field Summary
static String ROLE
          Role name of this avalon component.
 
Method Summary
 void crawl(URL url)
          This is the same as calling crawl(url,-1);
 void crawl(URL url, int maxDepth)
          start crawling the URL.
 Iterator iterator()
          Iterate over crawling URLs.
 

Field Detail

ROLE

static final String ROLE
Role name of this avalon component. Its value is org.apache.cocoon.components.crawler.CocoonCrawler.

Method Detail

crawl

void crawl(URL url)
This is the same as calling crawl(url,-1);

Parameters:
url - The URL to start crawling from.

crawl

void crawl(URL url,
           int maxDepth)
start crawling the URL.

Calling this method initiates the crawling and tells the crawler not to crawl beyond a maximum depth.

Parameters:
url - The URL to start crawling from
maxDepth - The maximum depth to crawl to. -1 for no maxiumum.

iterator

Iterator iterator()
Iterate over crawling URLs.

This iterator will returns URL as result of crawling the base URL passed via crawling().

Returns:
Iterator iterates over crawling URLs.


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.