public static TrafficType parse()

in api/src/main/java/org/apache/rocketmq/remoting/api/command/TrafficType.java [26:39]


    public static TrafficType parse(int index) {
        switch (index) {
            case 0:
                return REQUEST_SYNC;
            case 1:
                return REQUEST_ASYNC;
            case 2:
                return REQUEST_ONEWAY;
            case 3:
                return RESPONSE;
            default:
                throw new IllegalArgumentException("TrafficType " + index + " is not supported");
        }
    }