src/main/java/org/codemonkey4fun/service/ApnsServiceImpl.java
/**
     * send notification sequential way
     *
     * @param notification
     * @return
     */
send notification sequential way
@param notification
@return
send notification sequential way @param notification @return
@Override
    public SendResult push(Notification notification) {
        SendResult result = new SendResult();
        Request request = composeRequest(notification);
        Call call = httpClient.newCall(request);
        try {
            Response response = call.execute();
            ResponseBody body = response.body();
            int code = response.code();
            String content = body != null ? body.string() : null;
            Headers headers = response.headers();
            composeSendResult(result, code, content, headers);
        } catch (IOException e) {
            result.setMsg("Connect to APNs server occurs error");
            result.setCode(500);
            e.printStackTrace();
        }
        return result;
    }
@ Override public SendResult push ( Notification notification ) { SendResult result = new SendResult ( ) ; Request request = composeRequest ( notification ) ; Call call = httpClient . newCall ( request ) ; try { Response response = call . execute ( ) ; ResponseBody body = response . body ( ) ; int code = response . code ( ) ; String content = body != null ? body . string ( ) : null ; Headers headers = response . headers ( ) ; composeSendResult ( result , code , content , headers ) ; } catch ( IOException e ) { result . setMsg ( "Connect to APNs server occurs error" ) ; result . setCode ( 500 ) ; e . printStackTrace ( ) ; } return result ; }
send notification sequential way
 @param notification
 @return
send notification sequential way @param notification @return