// type.
out.writeMessageBegin(new TMessage(name, oneway ? ONEWAY : CALL, sequenceId));
// write the parameters
TProtocolWriter writer = new TProtocolWriter(out);
writer.writeStructBegin(name + "_args");
for (int i = 0; i < args.length; i++) {
Object value = args[i];
ParameterHandler parameter = parameterCodecs.get(i);
writer.writeField(parameter.getName(), parameter.getId(), parameter.getCodec(), value);
}