Examples of writeStructBegin()


Examples of com.facebook.swift.codec.internal.TProtocolWriter.writeStructBegin()

        // 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);
        }
View Full Code Here

Examples of com.facebook.swift.codec.internal.TProtocolWriter.writeStructBegin()

        long start = System.nanoTime();

        out.writeMessageBegin(new TMessage(name, responseType, sequenceId));

        TProtocolWriter writer = new TProtocolWriter(out);
        writer.writeStructBegin(resultStructName);
        writer.writeField(responseFieldName, (short) responseFieldId, responseCodec, result);
        writer.writeStructEnd();

        out.writeMessageEnd();
        out.getTransport().flush();
View Full Code Here

Examples of com.facebook.swift.codec.internal.TProtocolWriter.writeStructBegin()

        // 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);
        }
View Full Code Here

Examples of com.facebook.swift.codec.internal.TProtocolWriter.writeStructBegin()

    @Override
    public void write(T instance, TProtocol protocol)
            throws Exception
    {
        TProtocolWriter writer = new TProtocolWriter(protocol);
        writer.writeStructBegin(metadata.getStructName());

        for (ThriftFieldMetadata fieldMetadata : metadata.getFields(THRIFT_FIELD)) {
            // is the field readable?
            if (fieldMetadata.isWriteOnly()) {
                continue;
View Full Code Here

Examples of com.facebook.swift.codec.internal.TProtocolWriter.writeStructBegin()

                                   T result) throws Exception
    {
        out.writeMessageBegin(new TMessage(name, responseType, sequenceId));

        TProtocolWriter writer = new TProtocolWriter(out);
        writer.writeStructBegin(resultStructName);
        writer.writeField(responseFieldName, (short) responseFieldId, responseCodec, result);
        writer.writeStructEnd();

        out.writeMessageEnd();
        out.getTransport().flush();
View Full Code Here

Examples of com.facebook.swift.codec.internal.TProtocolWriter.writeStructBegin()

        // 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);
        }
View Full Code Here

Examples of com.facebook.swift.codec.internal.TProtocolWriter.writeStructBegin()

    public void write(UnionField value, TProtocol protocol)
            throws Exception
    {
        TProtocolWriter writer = new TProtocolWriter(protocol);

        writer.writeStructBegin("union");

        switch (value._id) {
        case 1:
            writer.writeStringField("stringValue", (short) 1, value.stringValue);
            break;
View Full Code Here

Examples of com.facebook.swift.codec.internal.TProtocolWriter.writeStructBegin()

    public void write(BonkField value, TProtocol protocol)
            throws Exception
    {
        TProtocolWriter writer = new TProtocolWriter(protocol);

        writer.writeStructBegin("bonk");

        String message = value.message;
        if (message != null) {
            writer.writeStringField("message", (short) 1, message);
        }
View Full Code Here

Examples of com.facebook.swift.codec.internal.TProtocolWriter.writeStructBegin()

    public void write(ArrayField value, TProtocol protocol)
            throws Exception
    {
        TProtocolWriter writer = new TProtocolWriter(protocol);

        writer.writeStructBegin("array");

        boolean[] booleanArray = value.booleanArray;
        if (booleanArray != null) {
            writer.writeBoolArrayField("booleanArray", (short) 1, booleanArray);
        }
View Full Code Here

Examples of com.facebook.swift.codec.internal.TProtocolWriter.writeStructBegin()

    @Override
    public void write(T instance, TProtocol protocol)
            throws Exception
    {
        TProtocolWriter writer = new TProtocolWriter(protocol);
        writer.writeStructBegin(metadata.getStructName());

        for (ThriftFieldMetadata fieldMetadata : metadata.getFields(THRIFT_FIELD)) {
            // is the field readable?
            if (fieldMetadata.isWriteOnly()) {
                continue;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.