org.osjava.scraping
Class AbstractHttpFetcher

java.lang.Object
  extended byorg.osjava.scraping.AbstractHttpFetcher
All Implemented Interfaces:
Fetcher
Direct Known Subclasses:
HttpFetcher, HttpsFetcher

public abstract class AbstractHttpFetcher
extends java.lang.Object
implements Fetcher

Fetches a piece of content for a url


Constructor Summary
AbstractHttpFetcher()
           
 
Method Summary
 Page fetch(java.lang.String uri, com.generationjava.config.Config cfg, org.osjava.oscube.container.Session session)
           
abstract  int getDefaultPort()
           
protected abstract  void startSession(java.net.URL url, int port, org.apache.commons.httpclient.HttpClient client, com.generationjava.config.Config cfg, org.osjava.oscube.container.Session session)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractHttpFetcher

public AbstractHttpFetcher()
Method Detail

getDefaultPort

public abstract int getDefaultPort()

startSession

protected abstract void startSession(java.net.URL url,
                                     int port,
                                     org.apache.commons.httpclient.HttpClient client,
                                     com.generationjava.config.Config cfg,
                                     org.osjava.oscube.container.Session session)

fetch

public Page fetch(java.lang.String uri,
                  com.generationjava.config.Config cfg,
                  org.osjava.oscube.container.Session session)
           throws FetchingException
Specified by:
fetch in interface Fetcher
Throws:
FetchingException


Copyright © 2003-2005 OSJava. All Rights Reserved.