code: public ApnsServiceBuilder asBatched(int waitTimeInSec, int maxWaitTimeInSec, ThreadFactory threadFactory) {
          return asBatched(waitTimeInSec, maxWaitTimeInSec, new ScheduledThreadPoolExecutor(1, threadFactory != null ? threadFactory : defaultThreadFactory()));
      }
docs: Construct service which will process notification requests in batch.
  After each request batch will wait <code>waitTimeInSec</code> for more request to come
  before executing but not more than <code>maxWaitTimeInSec</code>
  
  Each batch creates new connection and close it after finished.
  In case reconnect policy is specified it will be applied by batch processing.
  E.g.: {@link ReconnectPolicy.Provided#EVERY_HALF_HOUR} will reconnect the connection in case batch is running for more than half an hour
  
  Note: It is not recommended to use pooled connection
  
  @param waitTimeInSec
  time to wait for more notification request before executing
  batch
  @param maxWaitTimeInSec
  maximum wait time for batch before executing
  @param threadFactory
  thread factory to use for batch processing