@Override
        public BooleanAckCommand createBooleanAckCommand(final CommandHeader request,
                final ResponseStatus responseStatus, final String errorMsg) {
            int httpCode = -1;
            switch (responseStatus) {
            case NO_ERROR:
                httpCode = HttpStatus.Success;
                break;
            case THREADPOOL_BUSY:
            case NO_PROCESSOR:
                httpCode = HttpStatus.ServiceUnavilable;
                break;
            case TIMEOUT:
                httpCode = HttpStatus.GatewayTimeout;
                break;
            default:
                httpCode = HttpStatus.InternalServerError;
                break;
            }
            return new BooleanCommand(httpCode, errorMsg, request.getOpaque());
        }
Metamorphosis wire format type

@author boyan
@Date 2011-4-19
metamorphosis-commons/src/main/java/com/taobao/metamorphosis/network/MetamorphosisWireFormatType.java