|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RemoteContext
Contains information about the current results obtained by the parser, including the remote HTTP response obtained,
and the next HTTP request to be performed by the parser. This is made available to the user through the
NextInputHandler callback.
RemoteFollower,
Paginator,
NextInputHandler,
UrlReaderProvider| Method Summary | |
|---|---|
String |
getCurrentPage()
Returns the value parsed from the input that indicates the current page, or null if not available. |
int |
getCurrentPageNumber()
Returns the value parsed from the input that indicates the current page number. |
com.univocity.api.net.HttpResponse |
getCurrentResponse()
Returns the HttpResponse object with all information returned by the remote server
in its HTTP response message (which generated the current page). |
String |
getNextPage()
Returns the value parsed from the input that points to the next page. |
int |
getNextPageNumber()
Returns the value parsed from the input, converted to a valid int number that indicates the next
page number. |
com.univocity.api.net.UrlReaderProvider |
getNextRequest()
Returns the UrlReaderProvider prepared by the parser to access the next URL. |
int |
getPageCount()
Returns the number of the pages visited so far by the current Paginator. |
com.univocity.api.io.RateLimiter |
getRateLimiter()
Returns the RateLimiter used by the parser to prevent multiple concurrent requests against the same
server, using the interval defined by RemoteParserSettings.getRemoteInterval(). |
boolean |
hasMorePages()
Returns a flag indicating whether a next page is available from the current page. |
void |
stop()
Stops the attempt to read the next input page. |
| Method Detail |
|---|
String getCurrentPage()
null if not available.
int getCurrentPageNumber()
getCurrentPage() returns a valid numeric String it will be converted to an int
number that indicates the current page. If the information is unparseable/unavailable, -1 will be
returned.
-1 if unavailable.String getNextPage()
int getNextPageNumber()
int number that indicates the next
page number. If undefined, and getNextPage() returns a valid numeric String it will be converted
to an int number that indicates the next page. If the information is unparseable/unavailable,
-1 will be returned.
-1 otherwise.boolean hasMorePages()
getNextPage() returns a non-null value OR getNextPageNumber() returns a non-negative number and
returns true. If no information about a next page is available, false will be returned
true if information about a next page is available, otherwise falseint getPageCount()
Paginator.
com.univocity.api.net.HttpResponse getCurrentResponse()
HttpResponse object with all information returned by the remote server
in its HTTP response message (which generated the current page).
HttpResponse received for the current page. Will be null if the
process is running over local files.com.univocity.api.net.UrlReaderProvider getNextRequest()
UrlReaderProvider prepared by the parser to access the next URL. It inherits all configuration
options defined in the call to the current page. Cookies set in the HttpResponse of the current page
are automatically set into this request.
You can alter its configuration before its HttpRequest is executed to
fetch the next page.
UrlReaderProvider which will be used to execute a new HTTP request. Will be null if the
process is running over local files.void stop()
com.univocity.api.io.RateLimiter getRateLimiter()
RateLimiter used by the parser to prevent multiple concurrent requests against the same
server, using the interval defined by RemoteParserSettings.getRemoteInterval().
You can decrease or increase the wait time with RateLimiter.increaseWaitTime(long) and
RateLimiter.decreaseWaitTime(long). Calling rateLimiter.setInterval(0) disables the rate limiter
and unblocks all threads.
RateLimiter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||