org.smartcrawler.retriever
Class DefaultRetriever

java.lang.Object
  extended by org.smartcrawler.retriever.DefaultRetriever
All Implemented Interfaces:
Retriever

public class DefaultRetriever
extends java.lang.Object
implements Retriever

Version:
$Revision: 1.1 $
Author:
Davide Pozza

Field Summary
protected  RetrieverFactory cf
           
protected  org.apache.commons.httpclient.HostConfiguration hc
           
protected  org.apache.commons.httpclient.HttpClient httpClient
           
 
Constructor Summary
DefaultRetriever(java.lang.String host)
          Creates a new instance of HttpRetriever
 
Method Summary
protected  org.apache.commons.httpclient.HostConfiguration createHostConfiguration(java.lang.String host)
          Factory method which creates the default host configuration
protected  org.apache.commons.httpclient.HttpClient createHttpClient(boolean isMultiThread)
          Method which creates the default httpClient
protected  org.apache.commons.httpclient.HttpMethod createMethod(java.lang.String url)
          Factory method which creates the default http method
 Content getContent(Link link)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

httpClient

protected org.apache.commons.httpclient.HttpClient httpClient

hc

protected org.apache.commons.httpclient.HostConfiguration hc

cf

protected RetrieverFactory cf
Constructor Detail

DefaultRetriever

public DefaultRetriever(java.lang.String host)
Creates a new instance of HttpRetriever

Parameters:
host -
Method Detail

getContent

public Content getContent(Link link)
Specified by:
getContent in interface Retriever
Parameters:
link -
Returns:

createHttpClient

protected org.apache.commons.httpclient.HttpClient createHttpClient(boolean isMultiThread)
Method which creates the default httpClient

Parameters:
isMultiThread -
Returns:

createMethod

protected org.apache.commons.httpclient.HttpMethod createMethod(java.lang.String url)
                                                         throws java.lang.IllegalArgumentException
Factory method which creates the default http method

Parameters:
url - The url representing the link to retrieve
Returns:
Throws:
java.lang.IllegalArgumentException

createHostConfiguration

protected org.apache.commons.httpclient.HostConfiguration createHostConfiguration(java.lang.String host)
Factory method which creates the default host configuration

Parameters:
host -
Returns:


Copyright © 2005 sourceforge. All Rights Reserved.