notnoop/java-apns — pull request #161 by jcourtney1 (2014-06-12 22:43:53+00:00)
Title: Expose control over thread creation through ApnsServiceBuilder.

This is critical to being able to use java-apns on controlled hosted systems like Google's App Engine where one cannot simply create new threads using "new Thread(...)" but must instead rely on an API like com.google.appengine.api.ThreadManager to obtain threads. This change adds parameterization and one new method to the ApnsServiceBuilder to allow the caller to pass java.util.concurrent.ThreadFactorys for various purposes including:

* use by BatchApnsService (batch processing)
* use by QueuedApnsService (queue processing)
* use by ApnsConnectionImpl (error detection monitoring)

The only other change piggy-backed in here is simply specifying the correct generics type of the Future obtained in ApnsPooledConnection.sendMessage.