public interface IThrottledConnection
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
_rcsid |
static int |
FETCH_BAD_URI |
static int |
FETCH_CIRCULAR_REDIRECT |
static int |
FETCH_INTERRUPTED |
static int |
FETCH_IO_ERROR |
static int |
FETCH_NOT_TRIED |
static int |
FETCH_SEQUENCE_ERROR |
static int |
FETCH_UNKNOWN_ERROR |
Modifier and Type | Method and Description |
---|---|
void |
beginFetch(java.lang.String fetchType)
Begin the fetch process.
|
void |
close()
Close the connection.
|
void |
destroy()
Destroy the connection.
|
void |
doneFetch(org.apache.manifoldcf.crawler.interfaces.IProcessActivity activities)
Done with the fetch.
|
void |
executeFetch(java.lang.String urlPath,
java.lang.String userAgent,
java.lang.String from,
boolean redirectOK,
java.lang.String host,
FormData formData,
LoginCookies loginCookies)
Execute the fetch and get the return code.
|
LoginCookies |
getLastFetchCookies()
Get the last fetch cookies.
|
java.lang.String |
getLimitedResponseBody(int maxSize,
java.lang.String encoding)
Get limited response as a string.
|
java.io.InputStream |
getResponseBodyStream()
Get the response input stream.
|
int |
getResponseCode()
Get the http response code.
|
java.lang.String |
getResponseHeader(java.lang.String headerName)
Get a specified response header, if it exists.
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getResponseHeaders()
Get response headers
|
boolean |
hasExpired(long currentTime)
Check whether the connection has expired.
|
void |
noteInterrupted(java.lang.Throwable e)
Note that the connection fetch was interrupted by something.
|
void |
setAbortChecker(AbortChecker abortCheck)
Set the abort checker.
|
static final java.lang.String _rcsid
static final int FETCH_NOT_TRIED
static final int FETCH_CIRCULAR_REDIRECT
static final int FETCH_BAD_URI
static final int FETCH_SEQUENCE_ERROR
static final int FETCH_IO_ERROR
static final int FETCH_INTERRUPTED
static final int FETCH_UNKNOWN_ERROR
void setAbortChecker(AbortChecker abortCheck)
boolean hasExpired(long currentTime)
currentTime
- is the current time to use to judge if a connection has expired.void beginFetch(java.lang.String fetchType) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
fetchType
- is a short descriptive string describing the kind of fetch being requested. This
is used solely for logging purposes.org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
void executeFetch(java.lang.String urlPath, java.lang.String userAgent, java.lang.String from, boolean redirectOK, java.lang.String host, FormData formData, LoginCookies loginCookies) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
urlPath
- is the path part of the url, e.g. "/robots.txt"userAgent
- is the value of the userAgent header to use.from
- is the value of the from header to use.redirectOK
- should be set to true if you want redirects to be automatically followed.host
- is the value to use as the "Host" header, or null to use the default.formData
- describes additional form arguments and how to fetch the page.loginCookies
- describes the cookies that should be in effect for this page fetch.org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
int getResponseCode() throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
LoginCookies getLastFetchCookies() throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
java.util.Map<java.lang.String,java.util.List<java.lang.String>> getResponseHeaders() throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
java.lang.String getResponseHeader(java.lang.String headerName) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
headerName
- is the name of the header.org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
java.io.InputStream getResponseBodyStream() throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
java.lang.String getLimitedResponseBody(int maxSize, java.lang.String encoding) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
void noteInterrupted(java.lang.Throwable e)
void doneFetch(org.apache.manifoldcf.crawler.interfaces.IProcessActivity activities) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.core.interfaces.ManifoldCFException
void close()
void destroy()