Package com.google.maps
Class GeoApiContext
- java.lang.Object
-
- com.google.maps.GeoApiContext
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class GeoApiContext extends java.lang.Object implements java.io.CloseableThe entry point for making requests against the Google Geo APIs.Construct this object by using the enclosed
GeoApiContext.Builder.GeoApiContexts should be shared
GeoApiContext works best when you create a single GeoApiContext instance, or one per API key, and reuse it for all your Google Geo API queries. This is because each GeoApiContext manages its own thread pool, back-end client, and other resources.When you are finished with a GeoApiContext object, you must call
shutdown()on it to release its resources.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGeoApiContext.BuilderThe Builder forGeoApiContext.static interfaceGeoApiContext.RequestHandlerThe service provider interface that enables requests to be handled via switchable back ends.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()standard Java API to reclaim resourcesvoidshutdown()Shut down this GeoApiContext instance, reclaiming resources.
-
-
-
Method Detail
-
close
public void close() throws java.io.IOExceptionstandard Java API to reclaim resources- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
shutdown
public void shutdown()
Shut down this GeoApiContext instance, reclaiming resources. After shutdown() has been called, no further queries may be done against this instance.
-
-