Package net.sf.basedb.util
Class GeoLocation.ResponseFilter
java.lang.Object
net.sf.basedb.util.GeoLocation.ResponseFilter
- All Implemented Interfaces:
AbsoluteProgressReporter
,ProgressReporter
,Filter<org.apache.http.HttpResponse>
- Enclosing class:
- GeoLocation
static class GeoLocation.ResponseFilter
extends Object
implements Filter<org.apache.http.HttpResponse>, AbsoluteProgressReporter
We only accept "200" status response, "application/json" content type
and not more than 1K bytes (should be a lot less under normal operations).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Append a message to the previous one.void
Display a progress message.void
displayAbsolute
(long completed, String message) Display a progress message.boolean
evaluate
(org.apache.http.HttpResponse response) Evaluate if the given object should pass the filter or not.
-
Constructor Details
-
ResponseFilter
ResponseFilter()
-
-
Method Details
-
evaluate
public boolean evaluate(org.apache.http.HttpResponse response) Description copied from interface:Filter
Evaluate if the given object should pass the filter or not. -
display
Description copied from interface:ProgressReporter
Display a progress message.- Specified by:
display
in interfaceProgressReporter
- Parameters:
percent
- How many percent of the task that is completed or -1 if not knownmessage
- A message, or null
-
append
Description copied from interface:ProgressReporter
Append a message to the previous one.- Specified by:
append
in interfaceProgressReporter
- Parameters:
message
- The message
-
displayAbsolute
Description copied from interface:AbsoluteProgressReporter
Display a progress message.- Specified by:
displayAbsolute
in interfaceAbsoluteProgressReporter
- Parameters:
completed
- The progress of the taskmessage
- A message, or null
-