public class MVSHelper
extends java.lang.Object
This class encapsulates an MVSuggest web client and helps performing configuration tasks and managing the requests.
| Constructor and Description |
|---|
MVSHelper(java.lang.String mvsUrl, java.lang.String[] matchingLayers)
Creates a new instance with the given MVSuggest configuration.
|
| Modifier and Type | Method and Description |
|---|---|
long |
consumeLastRequestTime()
Gets the last request time and sets the time to zero so if it is called again before execution other request it will always return zero.
|
static MVSHelper |
getConfiguredInstance(JobConf conf)
Creates a
MVSHelper instance using the current job configuration |
java.util.List<GeoAreaInfo> |
pushRequest(java.lang.String location)
Adds a field to the current request.
|
java.util.List<GeoAreaInfo> |
request()
Sends a request to MVSuggest using the location texts contained in the buffer.
|
public MVSHelper(java.lang.String mvsUrl,
java.lang.String[] matchingLayers)
throws java.io.IOException
mvsUrl - the MVSuggest service URLmatchingLayers - the layers MVSuggest should usejava.io.IOExceptionpublic long consumeLastRequestTime()
public static MVSHelper getConfiguredInstance(JobConf conf) throws java.io.IOException
MVSHelper instance using the current job configurationconf - the job configurationjava.io.IOExceptionpublic java.util.List<GeoAreaInfo> pushRequest(java.lang.String location) throws java.io.IOException
request() methodlocation - a location textjava.io.IOExceptionpublic java.util.List<GeoAreaInfo> request() throws java.io.IOException
java.io.IOExceptionCopyright © 2016 Oracle and/or its affiliates. All Rights Reserved.