Examples of readMessageBegin()


Examples of org.apache.thrift.protocol.TProtocol.readMessageBegin()

    {
        try {
            messageBuffer.markReaderIndex();
            TTransport inputTransport = new TChannelBufferInputTransport(messageBuffer);
            TProtocol inputProtocol = getProtocolFactory().getInputProtocolFactory().getProtocol(inputTransport);
            TMessage message = inputProtocol.readMessageBegin();
            messageBuffer.resetReaderIndex();
            return message.seqid;
        } catch (Throwable t) {
            throw new TTransportException("Could not find sequenceId in Thrift message");
        }
View Full Code Here

Examples of org.apache.thrift.protocol.TProtocol.readMessageBegin()

        try
        {
            //Get Protocol from transport
            TProtocol clientProtocol = this.protocolFactory.getProtocol(clientTransport);

            TMessage message = clientProtocol.readMessageBegin();
            //Arguments
            ProcessFunction invokedProcessFunction = this.getProcessMap().get(message.name);
            if (invokedProcessFunction == null) {
                throw new RuntimeException("Unable to find a matching ProcessFunction for invoked method : " + message.name);
            }
View Full Code Here

Examples of org.apache.thrift.protocol.TProtocol.readMessageBegin()

            //Get command name
            ThriftNettyChannelBuffer ttransport = new ThriftNettyChannelBuffer(input, null);
            TProtocol iprot = this.protocolFactory.getProtocol(ttransport);
            input.markReaderIndex();
            TMessage message = iprot.readMessageBegin();
            input.resetReaderIndex();

            ThriftRequestWrapper thriftRequestWrapper = new ThriftRequestWrapper();

            thriftRequestWrapper.setClientSocket(clientTransport);
View Full Code Here

Examples of org.apache.thrift.protocol.TProtocol.readMessageBegin()

            int initialReadBytes = decodeAttemptTransport.getReadByteCount();
            TProtocol inputProtocol =
                    inputProtocolFactory.getProtocol(decodeAttemptTransport);

            // Skip through the message
            inputProtocol.readMessageBegin();
            TProtocolUtil.skip(inputProtocol, TType.STRUCT);
            inputProtocol.readMessageEnd();

            messageLength = decodeAttemptTransport.getReadByteCount() - initialReadBytes;
        } catch (TTransportException | IndexOutOfBoundsException e) {
View Full Code Here

Examples of org.apache.thrift.protocol.TProtocol.readMessageBegin()

    {
        try {
            messageBuffer.markReaderIndex();
            TTransport inputTransport = new TChannelBufferInputTransport(messageBuffer);
            TProtocol inputProtocol = getProtocolFactory().getInputProtocolFactory().getProtocol(inputTransport);
            TMessage message = inputProtocol.readMessageBegin();
            messageBuffer.resetReaderIndex();
            return message.seqid;
        } catch (Throwable t) {
            throw new TTransportException("Could not find sequenceId in Thrift message");
        }
View Full Code Here

Examples of org.apache.thrift.protocol.TProtocol.readMessageBegin()

    {
        try {
            messageBuffer.markReaderIndex();
            TTransport inputTransport = new TChannelBufferInputTransport(messageBuffer);
            TProtocol inputProtocol = getProtocolFactory().getInputProtocolFactory().getProtocol(inputTransport);
            TMessage message = inputProtocol.readMessageBegin();
            messageBuffer.resetReaderIndex();
            return message.seqid;
        } catch (Throwable t) {
            throw new TTransportException("Could not find sequenceId in Thrift message");
        }
View Full Code Here

Examples of org.apache.thrift.protocol.TProtocol.readMessageBegin()

        boolean isOneWayMethod = false;

        // Create a temporary transport wrapping the output buffer, so that we can read the method name for this message
        TChannelBufferInputTransport requestReadTransport = new TChannelBufferInputTransport(requestBufferTransport.getOutputBuffer().duplicate());
        TProtocol protocol = channel.getProtocolFactory().getOutputProtocolFactory().getProtocol(requestReadTransport);
        TMessage message = protocol.readMessageBegin();
        String methodName = message.name;

        isOneWayMethod = clientClassHasReceiveHelperMethod(methodName);

        return isOneWayMethod;
View Full Code Here

Examples of org.apache.thrift.protocol.TProtocol.readMessageBegin()

                    new TNiftyTransport(channel, buffer, ThriftTransportType.UNFRAMED);
            TProtocol inputProtocol =
                    inputProtocolFactory.getProtocol(decodeAttemptTransport);

            // Skip through the message
            inputProtocol.readMessageBegin();
            TProtocolUtil.skip(inputProtocol, TType.STRUCT);
            inputProtocol.readMessageEnd();

            messageLength = buffer.readerIndex() - messageStartReaderIndex;
        } catch (IndexOutOfBoundsException e) {
View Full Code Here

Examples of org.apache.thrift.protocol.TProtocol.readMessageBegin()

    {
        try {
            messageBuffer.markReaderIndex();
            TTransport inputTransport = new TChannelBufferInputTransport(messageBuffer);
            TProtocol inputProtocol = getProtocolFactory().getInputProtocolFactory().getProtocol(inputTransport);
            TMessage message = inputProtocol.readMessageBegin();
            messageBuffer.resetReaderIndex();
            return message.seqid;
        } catch (Throwable t) {
            throw new TTransportException("Could not find sequenceId in Thrift message");
        }
View Full Code Here

Examples of org.apache.thrift.protocol.TProtocol.readMessageBegin()

    {
        try {
            messageBuffer.markReaderIndex();
            TTransport inputTransport = new TChannelBufferInputTransport(messageBuffer);
            TProtocol inputProtocol = getProtocolFactory().getInputProtocolFactory().getProtocol(inputTransport);
            TMessage message = inputProtocol.readMessageBegin();
            messageBuffer.resetReaderIndex();
            return message.seqid;
        } catch (Throwable t) {
            throw new TTransportException("Could not find sequenceId in Thrift message");
        }
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.