Package com.iizix.server.region
Class IPWhoIs
- java.lang.Object
-
- com.iizix.geo.RegionLocationService
-
- com.iizix.server.region.IPWhoIs
-
public class IPWhoIs extends RegionLocationService
The free "IPWhoIs.io" service provider for region location information.- Author:
- Christopher Mindus
-
-
Field Summary
-
Fields inherited from class com.iizix.geo.RegionLocationService
ENCODING, ENCODING_NAME
-
-
Constructor Summary
Constructors Constructor Description IPWhoIs(IWebServiceEngine wse, ServerSettings settings)
Constructs the service provider for the region location information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected RegionLocation
request(java.lang.String ipAddress)
Requests region location information from the service provider.-
Methods inherited from class com.iizix.geo.RegionLocationService
configure, createRegionLocation, createRegionLocation, createRegionLocation, getDefaultName, getInstance, getName, getNames, initialize, isAvailable, isDisposed, onDisposed, parse, setGlobalCacheSize, shutdown
-
-
-
-
Constructor Detail
-
IPWhoIs
public IPWhoIs(IWebServiceEngine wse, ServerSettings settings)
Constructs the service provider for the region location information. The server will once constructed, register the service with its name. The name is "IPWhoIs" and the default timeout is set to 20 seconds, but the site is really fast.- Parameters:
wse
- The WebService engine used to determine proxy.settings
- Server settings.
-
-
Method Detail
-
request
protected RegionLocation request(java.lang.String ipAddress) throws java.io.IOException, java.io.InterruptedIOException, java.lang.InterruptedException
Requests region location information from the service provider. When the request has completed with or without error, call- Specified by:
request
in classRegionLocationService
- Parameters:
ipAddress
- The IP address request.- Returns:
- The region location information, must always be non-null.
- Throws:
java.io.IOException
- For I/O errors.java.io.InterruptedIOException
- If an I/O operation is interrupted.java.lang.InterruptedException
- If thread is interrupted.
-
-