Class CronetDataSource.Factory

    • Constructor Detail

      • Factory

        public Factory​( cronetEngine,
                       Executor executor)
        Creates an instance.
        cronetEngine - A CronetEngine to make the requests. This should not be a fallback instance obtained from JavaCronetProvider. It's more efficient to use DefaultHttpDataSource instead in this case.
        executor - The Executor that will handle responses. This may be a direct executor (i.e. executes tasks on the calling thread) in order to avoid a thread hop from Cronet's internal network thread to the response handling thread. However, to avoid slowing down overall network performance, care must be taken to make sure response handling is a fast operation when using a direct executor.