Package com.taobao.tdhs.client.exception

Examples of com.taobao.tdhs.client.exception.TDHSTimeoutException


        parameters.setConnectionNumber(connectionNumber);
        parameters.setNeedReconnect(needReconnect);
        tdhsNet.initNet(parameters, this.version.getTdhsProtocol().shakeHandPacket(this.timeOut, readCode, writeCode),
                responses);
        if (connectTimeOut > 0 && !awaitForConnected(connectTimeOut, TimeUnit.MILLISECONDS)) {
            throw new TDHSTimeoutException("connect time out");
        }
    }
View Full Code Here


        try {
            while (true) {
                BasePacket ret = null;
                ret = queue.poll(timeOut, TimeUnit.MILLISECONDS);
                if (ret == null) {
                    throw new TDHSTimeoutException("TimeOut");
                } else {
                    if (TDHSResponseEnum.ClientStatus.ACCEPT.equals(ret.getClientStatus())) {
                        retData.write(ret.getData());
                    } else if (TDHSResponseEnum.ClientStatus.OK.equals(ret.getClientStatus())) {
                        retData.write(ret.getData());
View Full Code Here

    private TDHSResponse[] do_real_response(ArrayBlockingQueue<BasePacket> queue) throws TDHSException {
        BasePacket ret = null;
        try {
            ret = queue.poll(getTimeOut(), TimeUnit.MILLISECONDS);
            if (ret == null) {
                throw new TDHSTimeoutException("TimeOut");
            }
            if (!TDHSResponseEnum.ClientStatus.MULTI_STATUS.equals(ret.getClientStatus())) {
                if (ret.getClientStatus() != null && ret.getClientStatus().getStatus() >= 400 &&
                        ret.getClientStatus().getStatus() < 600) {
                    throw new TDHSBatchException(
View Full Code Here

TOP

Related Classes of com.taobao.tdhs.client.exception.TDHSTimeoutException

Copyright © 2018 www.massapicom. 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.