public void finishExchange(boolean refresh, String errmsg) { errMessage = errmsg; if (status != ExchangeState.COMPLETED) { status = ExchangeState.FAILED; forceToStop = true; } if (request != null) request.release(); if (response != null) response.release(); if (refresh) { notifyExchangeFinished(); } }
public void setCompleted() { status = ExchangeState.COMPLETED; notifyExchangeFinished(); }