Changeset View
Changeset View
Standalone View
Standalone View
src/it/reyboz/bustorino/backend/Fetcher.java
Show All 22 Lines | public interface Fetcher { | ||||
* Status codes.<br> | * Status codes.<br> | ||||
*<br> | *<br> | ||||
* OK: got a response, parsed correctly, obtained some data<br> | * OK: got a response, parsed correctly, obtained some data<br> | ||||
* CLIENT_OFFLINE: can't connect to the internet<br> | * CLIENT_OFFLINE: can't connect to the internet<br> | ||||
* SERVER_ERROR: the server replied anything other than HTTP 200, basically<br> | * SERVER_ERROR: the server replied anything other than HTTP 200, basically<br> | ||||
* for 404 special constant (see @FiveTAPIFetcher) | * for 404 special constant (see @FiveTAPIFetcher) | ||||
* PARSER_ERROR: the server replied something that can't be parsed, probably it's not the data we're looking for (e.g. "PHP: Fatal Error")<br> | * PARSER_ERROR: the server replied something that can't be parsed, probably it's not the data we're looking for (e.g. "PHP: Fatal Error")<br> | ||||
* EMPTY_RESULT_SET: the response is valid and indicates there are no stops\routes\"passaggi"\results for your query<br> | * EMPTY_RESULT_SET: the response is valid and indicates there are no stops\routes\"passaggi"\results for your query<br> | ||||
* NOT_FOUND: response is valid, no parsing errors, but the desired stops/routes wasn't found | |||||
* QUERY_TOO_SHORT: input more characters and retry. | * QUERY_TOO_SHORT: input more characters and retry. | ||||
*/ | */ | ||||
enum Result { | enum Result { | ||||
OK, CLIENT_OFFLINE, SERVER_ERROR, SETUP_ERROR,PARSER_ERROR, EMPTY_RESULT_SET, QUERY_TOO_SHORT, SERVER_ERROR_404, | OK, CLIENT_OFFLINE, SERVER_ERROR, SETUP_ERROR,PARSER_ERROR, EMPTY_RESULT_SET, QUERY_TOO_SHORT, SERVER_ERROR_404, | ||||
CONNECTION_ERROR | CONNECTION_ERROR, NOT_FOUND | ||||
} | } | ||||
} | } |
Public contents are in Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) or GNU Free Documentation License (at your option) unless otherwise noted. · Contact / Register