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