retryable-retrofit

TODO: A way to retry many failed Retrofit calls. Useful in combination with listening to connectivity changes on Android.

Лицензия

Лицензия

Категории

Категории

Retrofit Сеть HTTP Clients
Группа

Группа

com.nightlynexus.retryable-retrofit
Идентификатор

Идентификатор

retryable-android
Последняя версия

Последняя версия

0.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

retryable-retrofit
TODO: A way to retry many failed Retrofit calls. Useful in combination with listening to connectivity changes on Android.
Ссылка на сайт

Ссылка на сайт

https://github.com/NightlyNexus/retryable-retrofit
Система контроля версий

Система контроля версий

https://github.com/NightlyNexus/retryable-retrofit

Скачать retryable-android

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.nightlynexus.retryable-retrofit/retryable-android/ -->
<dependency>
    <groupId>com.nightlynexus.retryable-retrofit</groupId>
    <artifactId>retryable-android</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.nightlynexus.retryable-retrofit/retryable-android/
implementation 'com.nightlynexus.retryable-retrofit:retryable-android:0.1.0'
// https://jarcasting.com/artifacts/com.nightlynexus.retryable-retrofit/retryable-android/
implementation ("com.nightlynexus.retryable-retrofit:retryable-android:0.1.0")
'com.nightlynexus.retryable-retrofit:retryable-android:jar:0.1.0'
<dependency org="com.nightlynexus.retryable-retrofit" name="retryable-android" rev="0.1.0">
  <artifact name="retryable-android" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.nightlynexus.retryable-retrofit', module='retryable-android', version='0.1.0')
)
libraryDependencies += "com.nightlynexus.retryable-retrofit" % "retryable-android" % "0.1.0"
[com.nightlynexus.retryable-retrofit/retryable-android "0.1.0"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
com.nightlynexus.retryable-retrofit : retryable jar 0.1.0
com.google.android : android jar 4.1.1.4

Модули Проекта

Данный проект не имеет модулей.

Retryable-Retrofit

TODO: A way to retry many failed Retrofit calls. Useful in combination with listening to connectivity changes on Android.

Download

Download the latest JAR or grab via Maven:

<dependency>
  <groupId>com.nightlynexus.retryable-retrofit</groupId>
  <artifactId>retryable</artifactId>
  <version>0.1.0</version>
</dependency>

or Gradle:

compile 'com.nightlynexus.retryable-retrofit:retryable:0.1.0'

TODO: Snapshots of the development version are available in Sonatype's snapshots repository.

Usage

TODO

RetryableCalls retryableCalls = new RetryableCalls();
Retrofit retrofit = new Retrofit.Builder()
    .addCallAdapterFactory(retryableCalls.getFactory())
    ...
    .build();

// Listen for Android's connectivity changes.
ConnectivityAutoRetryer autoRetryer = new ConnectivityAutoRetryer(retryableCalls, context);
autoRetryer.register();

class AndroidView {
  RetryableCall<Void> call;
  
  void attach() {
    call = retrofitService.get();
    call.enqueue(new RetryableCallback<Void>() {
      ...
    });
    // call will be retried automatically until canceled or completed.
  }
  
  void detach() {
    // Cancel the call and release it and its callback from the RetryableCalls instance if it has not been completed yet.
    call.cancel();
  }
}

License

Copyright 2017 Eric Cochran

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Версии библиотеки

Версия
0.1.0