Beispiel #1
0
 private void handleError(AbstractServerProxy proxy) {
   if (proxy instanceof JsonDimProxy) {
     this.errorMessage =
         ResourceManager.getInstance()
             .getCurrentBundle()
             .getString(IStringCommon.RES_SERVER_ERROR, IStringCommon.FAMILY_COMMON);
     if (proxy.getRequestAction().equals(IServerProxyConstants.ACT_GET_DIM_TOKEN)) {
       notifyDimFinish();
     } else if (proxy.getRequestAction().equals(IServerProxyConstants.ACT_GET_DIM_PTN)) {
       notifyGetPtnMutex();
     }
   }
 }
 // TODO need to add the jobid for transactinError by yren
 public void transactionError(AbstractServerProxy proxy) {
   String errorMessage = proxy.getErrorMsg();
   if (errorMessage == null || errorMessage.length() == 0) {
     errorMessage =
         ResourceManager.getInstance()
             .getCurrentBundle()
             .getString(IStringCommon.RES_SERVER_ERROR, IStringCommon.FAMILY_COMMON);
   }
   postErrorMessage(errorMessage);
 }
 public boolean isAllowNetworkRequest(AbstractServerProxy proxy) {
   if (!NetworkStatusManager.getInstance().isConnected()) {
     String errorMessage =
         ResourceManager.getInstance()
             .getCurrentBundle()
             .getString(IStringCommon.RES_NO_CELL_COVERAGE, IStringCommon.FAMILY_COMMON);
     proxy.setErrorMsg(errorMessage);
     try {
       Thread.sleep(2000);
     } catch (InterruptedException e) {
       e.printStackTrace();
     }
     return false;
   }
   return true;
 }