org.archive.wayback.resourcestore.resourcefile
Class TimeoutArchiveReaderFactory

java.lang.Object
  extended by org.archive.io.ArchiveReaderFactory
      extended by org.archive.wayback.resourcestore.resourcefile.TimeoutArchiveReaderFactory
All Implemented Interfaces:
org.archive.io.ArchiveFileConstants

public class TimeoutArchiveReaderFactory
extends org.archive.io.ArchiveReaderFactory

Sad but needed subclass of the ArchiveReaderFactory, allows config of timeouts for connect and reads on underlying HTTP connections, and overrides the one getArchiveReader(URL,long) method to enable setting the timeouts. This functionality should be moved into the ArchiveReaderFactory.

Author:
brad

Field Summary
 
Fields inherited from interface org.archive.io.ArchiveFileConstants
ABSOLUTE_OFFSET_KEY, CDX, CDX_FILE, CDX_LINE_BUFFER_SIZE, CRLF, DATE_FIELD_KEY, DEFAULT_DIGEST_METHOD, DOT_COMPRESSED_FILE_EXTENSION, DUMP, GZIP_DUMP, HEADER, INVALID_SUFFIX, LENGTH_FIELD_KEY, MIMETYPE_FIELD_KEY, NOHEAD, OCCUPIED_SUFFIX, READER_IDENTIFIER_FIELD_KEY, RECORD_IDENTIFIER_FIELD_KEY, SINGLE_SPACE, TYPE_FIELD_KEY, URL_FIELD_KEY, VERSION_FIELD_KEY
 
Constructor Summary
TimeoutArchiveReaderFactory()
           
TimeoutArchiveReaderFactory(int timeout)
           
TimeoutArchiveReaderFactory(int connectTimeout, int readTimeout)
           
 
Method Summary
protected  org.archive.io.ArchiveReader getArchiveReader(URL f, long offset)
           
 
Methods inherited from class org.archive.io.ArchiveReaderFactory
addUserAgent, asRepositionable, get, get, get, get, get, get, getArchiveReader, getArchiveReader, getArchiveReader, getArchiveReader, getArchiveReader, getArchiveReader, isCompressed, makeARCLocal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeoutArchiveReaderFactory

public TimeoutArchiveReaderFactory(int connectTimeout,
                                   int readTimeout)

TimeoutArchiveReaderFactory

public TimeoutArchiveReaderFactory(int timeout)

TimeoutArchiveReaderFactory

public TimeoutArchiveReaderFactory()
Method Detail

getArchiveReader

protected org.archive.io.ArchiveReader getArchiveReader(URL f,
                                                        long offset)
                                                 throws IOException
Overrides:
getArchiveReader in class org.archive.io.ArchiveReaderFactory
Throws:
IOException


Copyright © 2005-2011 Internet Archive. All Rights Reserved.