RetryIns.java 1.15 KB
package th.co.ais.ssbsrfc.instance;

import ec02.utils.AppLog;

public class RetryIns {
	private int countRetry = 0;
	private int max = 0;
//	private EquinoxRawData eqx = null;
	private String url = null;
	
	public RetryIns(int max, /*EquinoxRawData eqx,*/ String url) {
		super();
		this.max = max;
		this.countRetry = 0;
//		this.eqx = eqx;
		this.url = url;
	}
	public boolean isRetry(EC02Instance ec02Instance, String key)
	{
		boolean isBool = false;
		if (this.max > this.countRetry) {
			this.countRetry++;
			AppLog.d("## RETRY MESSAGE MAX:" + this.getMax() + " COUNT RETRY:" + this.getCountRetry());
			isBool = true;
		} else {
			ec02Instance.getAFInstance().getDicRetry().remove(key);
		}
		return isBool;
	}
	public int getCountRetry() {
		return countRetry;
	}
	public void setCountRetry(int countRetry) {
		this.countRetry = countRetry;
	}
	public int getMax() {
		return max;
	}
	public void setMax(int max) {
		this.max = max;
	}
//	public EquinoxRawData getEqx() {
//		return eqx;
//	}
//	public void setEqx(EquinoxRawData eqx) {
//		this.eqx = eqx;
//	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
}