Examples of consume()


Examples of org.antlr.v4.runtime.CommonTokenStream.consume()

        tokens.consume();
        assertEquals("34", tokens.LT(1).getText());
        assertEquals("=", tokens.LT(-1).getText());

        tokens.consume();
        assertEquals(";", tokens.LT(1).getText());
        assertEquals("34", tokens.LT(-1).getText());

        tokens.consume();
        assertEquals(Token.EOF, tokens.LA(1));
View Full Code Here

Examples of org.antlr.v4.runtime.CommonTokenStream.consume()

        tokens.consume();
        assertEquals(";", tokens.LT(1).getText());
        assertEquals("34", tokens.LT(-1).getText());

        tokens.consume();
        assertEquals(Token.EOF, tokens.LA(1));
        assertEquals(";", tokens.LT(-1).getText());

        assertEquals("34", tokens.LT(-2).getText());
        assertEquals("=", tokens.LT(-3).getText());
View Full Code Here

Examples of org.antlr.v4.runtime.CommonTokenStream.consume()

    tokens.fill();

    assertEquals(Token.EOF, tokens.LA(1));
    assertEquals(0, tokens.index());
    assertEquals(1, tokens.size());
    tokens.consume();
  }
}
View Full Code Here

Examples of org.antlr.v4.runtime.TokenStream.consume()

        LexerInterpreter lexEngine = g.createLexerInterpreter(input);
        TokenStream tokens = createTokenStream(lexEngine);

        Token t = tokens.LT(1);
        while ( t.getType()!=Token.EOF ) {
            tokens.consume();
            t = tokens.LT(1);
        }

        String result = tokens.getText();
        String expecting = "x = 3 * 0 + 2 * 0;";
 
View Full Code Here

Examples of org.apache.hedwig.client.api.Subscriber.consume()

        }
        // Now manually send a consume message for each message received
        for (int i = 0; i < batchSize; i++) {
            boolean success = true;
            try {
                mySubscriber.consume(myTopic, localSubscriberId, MessageSeqId.newBuilder().setLocalComponent(i + 1)
                                     .build());
            } catch (ClientNotSubscribedException e) {
                success = false;
            }
            assertTrue(success);
View Full Code Here

Examples of org.apache.hedwig.client.api.Subscriber.consume()

        }
        // Now manually send a consume message for each message received
        for (int i = 0; i < batchSize; i++) {
            boolean success = true;
            try {
                mySubscriber.consume(myTopic, localSubscriberId, MessageSeqId.newBuilder().setLocalComponent(i + 1)
                                     .build());
            } catch (ClientNotSubscribedException e) {
                success = false;
            }
            assertTrue(success);
View Full Code Here

Examples of org.apache.hedwig.client.handlers.SubscribeResponseHandler.consume()

                "Cannot send consume message since client is not subscribed to topic: "
                + topic.toStringUtf8() + ", subscriberId: " + subscriberId.toStringUtf8());
        }
        // Send the consume message to the server using the same subscribe
        // channel that the topic subscription uses.
        subscribeResponseHandler.consume(topicSubscriber, messageSeqId);
    }

    public boolean hasSubscription(ByteString topic, ByteString subscriberId) throws CouldNotConnectException,
        ServiceDownException {
        // The subscription type of info should be stored on the server end, not
View Full Code Here

Examples of org.apache.qpid.test.utils.QpidClientConnection.consume()

        {
            QpidClientConnection conn = new QpidClientConnection(BROKER);

            conn.connect();
            // clear queue
            conn.consume(queue, consumeTimeout);

            conn.disconnect();
        }

        super.tearDown();
View Full Code Here

Examples of org.apache.qpid.testutil.QpidClientConnection.consume()

        QpidClientConnection conn = new QpidClientConnection(BROKER);

        conn.connect();
        // clear queue
        conn.consume(queueName, consumeTimeout);
        // load test data
        _logger.info("creating test data, " + numTestMessages + " messages");
        conn.put(queueName, payload, numTestMessages);
        // close this connection
        conn.disconnect();
View Full Code Here

Examples of org.apache.s4.comm.zk.ZkQueue.consume()

        } else {
            System.out.println("Consumer");

            for (i = 0; i < max || true; i++) {
                try {
                    Integer r = (Integer) q.consume();
                    System.out.println("Item: " + r);
                } catch (KeeperException e) {
                    e.printStackTrace();
                    i--;
                } catch (InterruptedException e) {
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.