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 Constructor Description ResponseFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
append(String message)
Append a message to the previous one.void
display(int percent, String message)
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.
-
-
-
Method Detail
-
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
public void display(int percent, String message)
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
public void append(String message)
Description copied from interface:ProgressReporter
Append a message to the previous one.- Specified by:
append
in interfaceProgressReporter
- Parameters:
message
- The message
-
displayAbsolute
public void displayAbsolute(long completed, String message)
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
-
-