Examples of AMQProtocolHandler


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

     */
    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

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

        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

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

//        new FailoverRetrySupport<Object, AMQException>(new FailoverProtectedOperation<Object, AMQException>()
//        {
//            public Object execute() throws AMQException, FailoverException
//            {

                AMQProtocolHandler protocolHandler = ((AMQConnection) _connection).getProtocolHandler();

                AMQFrame exchangeDeclare =
                        ExchangeDeclareBody.createAMQFrame(channelId,
                                                           protocolHandler.getProtocolMajorVersion(),
                                                           protocolHandler.getProtocolMinorVersion(), null, // arguments
                                                           false, // autoDelete
                                                           false, // durable
                                                           new AMQShortString(_name), // exchange
                                                           false, // internal
                                                           nowait, // nowait
                                                           true, // passive
                                                           0, // ticket
                                                           new AMQShortString(_type)); // type

                if (nowait)
                {
                    protocolHandler.writeFrame(exchangeDeclare);
                }
                else
                {
                    protocolHandler.syncWrite(exchangeDeclare, ExchangeDeclareOkBody.class, SYNC_TIMEOUT);
                }

//                return null;
//            }
//        }, (AMQConnection)_connection).execute();
View Full Code Here

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

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

        _protocolHandler = new AMQProtocolHandler(this);

        if (_logger.isDebugEnabled())
        {
          _logger.debug("Connecting with ProtocolHandler Version:"+_protocolHandler.getProtocolVersion());
        }
View Full Code Here

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

            }

            acknowledgeMessage(tag, false);
        }

        final AMQProtocolHandler handler = getProtocolHandler();

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

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

    protected AMQShortString declareQueue(final AMQDestination amqd, final boolean noLocal,
                                          final boolean nowait, final boolean passive) throws AMQException
    {
        //The 'noWait' parameter is only used on the 0-10 path, it is ignored on the 0-8/0-9/0-9-1 path

        final AMQProtocolHandler protocolHandler = getProtocolHandler();
        return new FailoverNoopSupport<AMQShortString, AMQException>(
                new FailoverProtectedOperation<AMQShortString, AMQException>()
                {
                    public AMQShortString execute() throws AMQException, FailoverException
                    {
                        // Generate the queue name if the destination indicates that a client generated name is to be used.
                        if (amqd.isNameRequired())
                        {
                            amqd.setQueueName(protocolHandler.generateQueueName());
                        }

                        sendQueueDeclare(amqd, passive);

                        return amqd.getAMQQueueName();
View Full Code Here

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

    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

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

     */
    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

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

    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

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

                    {
                        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
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.