Package org.apache.qpid.client.protocol

Examples of org.apache.qpid.client.protocol.AMQProtocolHandler


                            _removedConsumers.remove(i);
                        }
                    }

                    // Commits outstanding messages sent and outstanding acknowledgements.
                    final AMQProtocolHandler handler = getProtocolHandler();

                    TxCommitBody body = getMethodRegistry().createTxCommitBody();

                    handler.syncWrite(body.generateFrame(_channelId), TxCommitOkBody.class);

                    markClean();
                }

                catch (AMQException e)
View Full Code Here


                    {
                        checkNotClosed();

                        AMQDestination amqd = (AMQDestination) destination;

                        final AMQProtocolHandler protocolHandler = getProtocolHandler();
                        // TODO: Define selectors in AMQP
                        // TODO: construct the rawSelector from the selector string if rawSelector == null
                        final FieldTable ft = FieldTableFactory.newFieldTable();
                        // if (rawSelector != null)
                        // ft.put("headers", rawSelector.getDataAsBytes());
View Full Code Here

    public void declareAndBind(AMQDestination amqd)
            throws
            AMQException
    {
        AMQProtocolHandler protocolHandler = getProtocolHandler();
        declareExchange(amqd, protocolHandler, false);
        AMQShortString queueName = declareQueue(amqd, protocolHandler);
        bindQueue(queueName, amqd.getRoutingKey(), new FieldTable(), amqd.getExchangeName());
    }
View Full Code Here

     */
    private void registerConsumer(BasicMessageConsumer consumer, boolean nowait) throws AMQException // , FailoverException
    {
        AMQDestination amqd = consumer.getDestination();

        AMQProtocolHandler protocolHandler = getProtocolHandler();

        declareExchange(amqd, protocolHandler, false);

        AMQShortString queueName = declareQueue(amqd, protocolHandler);

View Full Code Here

            _temporaryTopicExchangeName = connectionURL.getTemporaryTopicExchangeName();
        }

        _failoverPolicy = new FailoverPolicy(connectionURL);

        _protocolHandler = new AMQProtocolHandler(this);

        // We are not currently connected
        _connected = false;

        Exception lastException = new Exception();
View Full Code Here

    public void declareAndBind(AMQDestination amqd)
            throws
            AMQException
    {
        AMQProtocolHandler protocolHandler = getProtocolHandler();
        declareExchange(amqd, protocolHandler, false);
        AMQShortString queueName = declareQueue(amqd, protocolHandler, false);
        bindQueue(queueName, amqd.getRoutingKey(), new FieldTable(), amqd.getExchangeName(), amqd);
    }
View Full Code Here

     */
    private void registerConsumer(C consumer, boolean nowait) throws AMQException // , FailoverException
    {
        AMQDestination amqd = consumer.getDestination();

        AMQProtocolHandler protocolHandler = getProtocolHandler();

        if (amqd.getDestSyntax() == DestSyntax.ADDR)
        {
            handleAddressBasedDestination(amqd,true,nowait);           
        }
View Full Code Here

        if (connectionURL.getTemporaryTopicExchangeName() != null)
        {
            _temporaryTopicExchangeName = connectionURL.getTemporaryTopicExchangeName();
        }

        _protocolHandler = new AMQProtocolHandler(this);

        _logger.info("Connecting with ProtocolHandler Version:"+_protocolHandler.getProtocolVersion());

        // We are not currently connected
        _connected = false;
View Full Code Here

        }
    }

    public void sendCommit() throws AMQException, FailoverException
    {
        final AMQProtocolHandler handler = getProtocolHandler();

        handler.syncWrite(getProtocolHandler().getMethodRegistry().createTxCommitBody().generateFrame(_channelId), TxCommitOkBody.class);
    }
View Full Code Here

    public BasicMessageConsumer_0_8 createMessageConsumer(final AMQDestination destination, final int prefetchHigh,
            final int prefetchLow, final boolean noLocal, final boolean exclusive, String messageSelector, final FieldTable arguments,
            final boolean noConsume, final boolean autoClosethrows JMSException
    {

        final AMQProtocolHandler protocolHandler = getProtocolHandler();
       return new BasicMessageConsumer_0_8(_channelId, _connection, destination, messageSelector, noLocal,
                                 _messageFactoryRegistry,this, protocolHandler, arguments, prefetchHigh, prefetchLow,
                                 exclusive, _acknowledgeMode, noConsume, autoClose);
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.client.protocol.AMQProtocolHandler

Copyright © 2018 www.massapicom. 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.