初始化

This commit is contained in:
谢洪龙
2017-08-23 12:20:15 +08:00
commit 491d430741
471 changed files with 16355 additions and 0 deletions
@@ -0,0 +1,40 @@
package com.ifish.jpush.common.resp;
/**
* Should retry for encountering this exception basically.
* Normally it is due to:
* 1. Connect timed out.
* 2. Read timed out.
* 3. Cannot parse domain.
*
* For Push action, if the exception is "Read timed out" you may not want to retry it.
*/
public class APIConnectionException extends Exception {
private static final long serialVersionUID = -2615370590441195647L;
private boolean readTimedout = false;
private int doneRetriedTimes = 0;
public APIConnectionException(String message, Throwable e) {
super(message, e);
}
public APIConnectionException(String message, Throwable e, int doneRetriedTimes) {
super(message, e);
this.doneRetriedTimes = doneRetriedTimes;
}
public APIConnectionException(String message, Throwable e, boolean readTimedout) {
super(message, e);
this.readTimedout = readTimedout;
}
public boolean isReadTimedout() {
return readTimedout;
}
public int getDoneRetriedTimes() {
return this.doneRetriedTimes;
}
}