Add logic to unbind based on callback completions
This CL converts the erstwhile ServiceConnector#run methods to now use postAsync(@NonNull Job<I, CompletableFuture<R>> job) this allows wrapping the callback invocation as a future completion whenever the terminal callback methods are invoked. We rely on a common idle_timeout setting value, provided by remote implementation such that all methods should reach their terminal state (invoke success or failure callback) within this duration. With the exception of download callback, which might take much longer than other methods subject to networks speeds etc. Incase of downloads, we enforce this idle timeout at the progress-callback level, such that if there is no progress within timeout interval, we will consider the download to have reached a terminal state. Bug: 340551198 Change-Id: I7ab213ca6b2360e908b29b788543948f544db635
Loading
Please register or sign in to comment