Package com.alibaba.rocketmq.remoting.exception

Examples of com.alibaba.rocketmq.remoting.exception.RemotingCommandException


                        try {
                            String value = this.extFields.get(fieldName);
                            if (null == value) {
                                Annotation annotation = field.getAnnotation(CFNotNull.class);
                                if (annotation != null) {
                                    throw new RemotingCommandException("the custom field <" + fieldName
                                            + "> is null");
                                }

                                continue;
                            }

                            field.setAccessible(true);
                            String type = field.getType().getCanonicalName();
                            Object valueParsed = null;

                            if (type.equals(StringName)) {
                                valueParsed = value;
                            }
                            else if (type.equals(IntegerName1) || type.equals(IntegerName2)) {
                                valueParsed = Integer.parseInt(value);
                            }
                            else if (type.equals(LongName1) || type.equals(LongName2)) {
                                valueParsed = Long.parseLong(value);
                            }
                            else if (type.equals(BooleanName1) || type.equals(BooleanName2)) {
                                valueParsed = Boolean.parseBoolean(value);
                            }
                            else if (type.equals(DoubleName1) || type.equals(DoubleName2)) {
                                valueParsed = Double.parseDouble(value);
                            }
                            else {
                                throw new RemotingCommandException("the custom field <" + fieldName
                                        + "> type is not supported");
                            }

                            field.set(objectHeader, valueParsed);
View Full Code Here


    public void checkFields() throws RemotingCommandException {
        try {
            TopicFilterType.valueOf(this.topicFilterType);
        }
        catch (Exception e) {
            throw new RemotingCommandException("topicFilterType = [" + topicFilterType + "] value invalid", e);
        }
    }
View Full Code Here

        if (MessageSysFlag.TransactionRollbackType == this.commitOrRollback) {
            return;
        }

        throw new RemotingCommandException("commitOrRollback field wrong");
    }
View Full Code Here

        if (MessageSysFlag.TransactionRollbackType == this.commitOrRollback) {
            return;
        }

        throw new RemotingCommandException("commitOrRollback field wrong");
    }
View Full Code Here

    public void checkFields() throws RemotingCommandException {
        try {
            TopicFilterType.valueOf(this.topicFilterType);
        }
        catch (Exception e) {
            throw new RemotingCommandException("topicFilterType = [" + topicFilterType + "] value invalid", e);
        }
    }
View Full Code Here

                        // 空值检查
                        if (null == value) {
                            Annotation annotation = field.getAnnotation(CFNotNull.class);
                            if (annotation != null) {
                                throw new RemotingCommandException("the custom field <" + name + "> is null");
                            }
                        }
                    }
                }
            }
View Full Code Here

                        // 空值检查
                        if (null == value) {
                            Annotation annotation = field.getAnnotation(CFNotNull.class);
                            if (annotation != null) {
                                throw new RemotingCommandException("the custom field <" + name + "> is null");
                            }
                        }
                    }
                }
            }
View Full Code Here

TOP

Related Classes of com.alibaba.rocketmq.remoting.exception.RemotingCommandException

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.