Package com.taobao.metamorphosis.exception

Examples of com.taobao.metamorphosis.exception.InvalidMessageException


        final int flag = buf.getInt();
        String attribute = null;
        int payLoadOffset = offset + HEADER_LEN;
        int payLoadLen = msgLen;
        if (payLoadLen > MAX_READ_BUFFER_SIZE) {
            throw new InvalidMessageException("Too much long payload length:" + payLoadLen);
        }
        // ��������ԣ���Ҫ��������
        if (MessageFlagUtils.hasAttribute(flag)) {
            // ȡ4���ֽڵ����Գ���
            final int attrLen = getInt(offset + HEADER_LEN, data);
View Full Code Here


     * @param checksum
     */
    public static final void vailidateMessage(final int offset, final int msgLen, final int checksum, final byte[] data)
            throws InvalidMessageException {
        if (checksum != CheckSum.crc32(data, offset, msgLen)) {
            throw new InvalidMessageException("Invalid message");
        }
    }
View Full Code Here

    }


    protected void checkMessage(final Message message) throws MetaClientException {
        if (message == null) {
            throw new InvalidMessageException("Null message");
        }
        if (StringUtils.isBlank(message.getTopic())) {
            throw new InvalidMessageException("Blank topic");
        }
        if (message.getData() == null) {
            throw new InvalidMessageException("Null data");
        }
    }
View Full Code Here

TOP

Related Classes of com.taobao.metamorphosis.exception.InvalidMessageException

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.