src/main/java/org/codemonkey4fun/service/ApnsServiceImpl.java
/**
     * Compose SendResult object by given parameters
     *
     * @param code
     * @param data
     * @param headers
     * @return
     */
Compose SendResult object by given parameters
@param code
@param data
@param headers
@return
Compose SendResult object by given parameters @param code @param data @param headers @return
private void composeSendResult(SendResult result, Integer code, String data, Headers headers) {
        result.setCode(code);
        String reason = "OK";
        if (data != null && !"".equals(data)) {
            reason = JSONObject.parseObject(data).getString("reason");
        }
        result.setMsg(reason);
        if (headers != null) {
            JSONObject jsonObject = new JSONObject();
            jsonObject.put("apns-id", headers.get("apns-id"));
            result.setResult(jsonObject);
        }
    }
private void composeSendResult ( SendResult result , Integer code , String data , Headers headers ) { result . setCode ( code ) ; String reason = "OK" ; if ( data != null && ! "" . equals ( data ) ) { reason = JSONObject . parseObject ( data ) . getString ( "reason" ) ; } result . setMsg ( reason ) ; if ( headers != null ) { JSONObject jsonObject = new JSONObject ( ) ; jsonObject . put ( "apns-id" , headers . get ( "apns-id" ) ) ; result . setResult ( jsonObject ) ; } }
Compose SendResult object by given parameters
 @param code
 @param data
 @param headers
 @return
Compose SendResult object by given parameters @param code @param data @param headers @return