Examples of TDHSResponse


Examples of com.taobao.tdhs.client.response.TDHSResponse

            }
            if (!TDHSResponseEnum.ClientStatus.MULTI_STATUS.equals(ret.getClientStatus())) {
                if (ret.getClientStatus() != null && ret.getClientStatus().getStatus() >= 400 &&
                        ret.getClientStatus().getStatus() < 600) {
                    throw new TDHSBatchException(
                            new TDHSResponse(ret.getClientStatus(), null, ret.getData(), charsetName));
                } else {
                    throw new TDHSException("unknown response code! [" + (ret.getClientStatus() != null ?
                            String.valueOf(ret.getClientStatus().getStatus()) : "") + "]");
                }
            }
            if (ret.getBatchNumber() != batchRequest.size()) {
                throw new TDHSException(
                        "unmatch batch size! request is[" + String.valueOf(batchRequest.size()) + "], response is [" +
                                String.valueOf(ret.getBatchNumber()) + "]");
            }

            TDHSResponse result[] = new TDHSResponse[batchRequest.size()];
            int i = 0;
            for (internal_struct is : batchRequest) {
                result[i++] =
                        do_response(responses.get(is.getPacket().getSeqId()), is.getMetaData(), is.getCharsetName());
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.