public class EBRetryStrategySimple extends Object implements EBRetryStrategy
Created by dusanklinec on 21.07.16.
Modifier and Type | Field and Description |
---|---|
protected int |
attempts |
protected static String |
FIELD_MAX_ATTEMPTS |
protected int |
maxAttempts |
static String |
NAME |
Constructor and Description |
---|
EBRetryStrategySimple() |
EBRetryStrategySimple(int maxAttempts) |
EBRetryStrategySimple(org.json.JSONObject json) |
Modifier and Type | Method and Description |
---|---|
EBRetryStrategy |
copy() |
boolean |
equals(Object o) |
protected void |
fromJSON(org.json.JSONObject json) |
int |
getMaxAttempts() |
String |
getName() |
long |
getWaitMilli() |
int |
hashCode() |
void |
onFail() |
void |
onSuccess() |
void |
reset() |
void |
setMaxAttempts(int maxAttempts) |
boolean |
shouldContinue() |
org.json.JSONObject |
toJSON(org.json.JSONObject json) |
String |
toString() |
public static final String NAME
protected static final String FIELD_MAX_ATTEMPTS
protected int maxAttempts
protected int attempts
public EBRetryStrategySimple(int maxAttempts)
public EBRetryStrategySimple()
public EBRetryStrategySimple(org.json.JSONObject json)
public void onFail()
onFail
in interface EBRetryStrategy
public void onSuccess()
onSuccess
in interface EBRetryStrategy
public void reset()
reset
in interface EBRetryStrategy
public boolean shouldContinue()
shouldContinue
in interface EBRetryStrategy
public long getWaitMilli()
getWaitMilli
in interface EBRetryStrategy
public org.json.JSONObject toJSON(org.json.JSONObject json)
toJSON
in interface EBRetryStrategy
protected void fromJSON(org.json.JSONObject json) throws org.json.JSONException
org.json.JSONException
public EBRetryStrategy copy()
copy
in interface EBRetryStrategy
public int getMaxAttempts()
public void setMaxAttempts(int maxAttempts)
public String getName()
getName
in interface EBRetryStrategy
Copyright © 2016. All rights reserved.