Created
November 12, 2013 04:55
-
-
Save jbcpollak/7425686 to your computer and use it in GitHub Desktop.
Address Geocoding Akka Future Factory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Setter | |
public class AddressGeocodingFutureFactory extends AbstractFutureFactory<Address> { | |
private GeocodingService geocoder; | |
@Override | |
public Future<Address> makeFuture(final Address address) { | |
return Futures.future(new Callable<Address>() { | |
public Profile call() throws Exception { | |
Address geoAddr = geocoder.lookup(addr); | |
return geoAddr; | |
} | |
}, executionContext); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment