public class URLGetHandler extends AbstractCrawlLister implements OFSNGetHandler
OFSNGetHandler
for returning a URL listing pointing to files within an OFSN
NOTE: Configuration parameters for this class include:
1. Server hostname
2. Server port
3. Webapp context-root
4. Path to product-root
5. Return type desired for URLsModifier and Type | Field and Description |
---|---|
protected static String |
DEFAULT_PROD_SERVER_CONTEXT |
protected static String |
DEFAULT_PROD_SERVER_HOSTNAME |
protected static String |
DEFAULT_PROD_SERVER_PORT |
protected static String |
DEFAULT_PRODUCT_ROOT |
protected static String |
DEFAULT_RETURN_TYPE |
protected static String |
DEFAULT_RETURN_VALUE |
DIR_FILTER, FILE_FILTER
Constructor and Description |
---|
URLGetHandler() |
Modifier and Type | Method and Description |
---|---|
void |
configure(Properties prop)
Configures this handler with the provided configuration stored in a
Properties object. |
File[] |
getListing(String filePath)
Handlers that implement this method take an
O nline
F ile S pecification N ame and return
back a listing of files on the remote server. |
byte[] |
retrieveChunk(String filepath,
long offset,
int length)
Retrieves a chunk of data from the remote file.
|
long |
sizeOf(String filepath)
Returns the size of the remote data, which may be the entire file in
question, or some subset/transformation on it.
|
crawlFiles
protected static final String DEFAULT_RETURN_VALUE
protected static final String DEFAULT_PROD_SERVER_HOSTNAME
protected static final String DEFAULT_PROD_SERVER_PORT
protected static final String DEFAULT_PROD_SERVER_CONTEXT
protected static final String DEFAULT_PRODUCT_ROOT
protected static final String DEFAULT_RETURN_TYPE
public void configure(Properties prop)
OFSNListHandler
Properties
object.configure
in interface OFSNGetHandler
configure
in interface OFSNListHandler
configure
in class AbstractCrawlLister
prop
- The configuration for this list handler.public byte[] retrieveChunk(String filepath, long offset, int length) throws ProductException
OFSNGetHandler
retrieveChunk
in interface OFSNGetHandler
filepath
- The path to the remote file.offset
- The offset in the remote data to retrieve.length
- The length of data to readProductException
- If any error occurs.public long sizeOf(String filepath)
OFSNGetHandler
sizeOf
in interface OFSNGetHandler
filepath
- The remote file in question.public File[] getListing(String filePath) throws ProductException, IllegalArgumentException
OFSNListHandler
O
nline
F
ile S
pecification N
ame and return
back a listing of files on the remote server.getListing
in interface OFSNListHandler
getListing
in class AbstractCrawlLister
filePath
- The OFSN path to list files from.File
objects.ProductException
- If any error occurs performing the listing on the server side.IllegalArgumentException
Copyright © 1999–2017 Apache OODT. All rights reserved.