|
|
|
@ -118,7 +118,7 @@ public class XxlJobRemotingUtil { |
|
|
|
|
// valid StatusCode
|
|
|
|
|
int statusCode = connection.getResponseCode(); |
|
|
|
|
if (statusCode != 200) { |
|
|
|
|
return new ReturnT<String>(ReturnT.FAIL_CODE, "xxl-rpc remoting fail, StatusCode("+ statusCode +") invalid. for url : " + url); |
|
|
|
|
return new ReturnT<String>(ReturnT.FAIL_CODE, "xxl-job remoting fail, StatusCode("+ statusCode +") invalid. for url : " + url); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// result
|
|
|
|
@ -135,13 +135,13 @@ public class XxlJobRemotingUtil { |
|
|
|
|
ReturnT returnT = GsonTool.fromJson(resultJson, ReturnT.class, returnTargClassOfT); |
|
|
|
|
return returnT; |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
logger.error("xxl-rpc remoting (url="+url+") response content invalid("+ resultJson +").", e); |
|
|
|
|
return new ReturnT<String>(ReturnT.FAIL_CODE, "xxl-rpc remoting (url="+url+") response content invalid("+ resultJson +")."); |
|
|
|
|
logger.error("xxl-job remoting (url="+url+") response content invalid("+ resultJson +").", e); |
|
|
|
|
return new ReturnT<String>(ReturnT.FAIL_CODE, "xxl-job remoting (url="+url+") response content invalid("+ resultJson +")."); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
logger.error(e.getMessage(), e); |
|
|
|
|
return new ReturnT<String>(ReturnT.FAIL_CODE, "xxl-rpc remoting error("+ e.getMessage() +"), for url : " + url); |
|
|
|
|
return new ReturnT<String>(ReturnT.FAIL_CODE, "xxl-job remoting error("+ e.getMessage() +"), for url : " + url); |
|
|
|
|
} finally { |
|
|
|
|
try { |
|
|
|
|
if (bufferedReader != null) { |
|
|
|
|