Package org.apache.qpid.server.queue

Examples of org.apache.qpid.server.queue.AMQQueue.bind()


        try
        {
            if (!exch.isBound(body.routingKey, body.arguments, queue))
            {
                queue.bind(body.routingKey, body.arguments, exch);
            }
        }
        catch (AMQInvalidRoutingKeyException rke)
        {
            throw body.getChannelException(AMQConstant.INVALID_ROUTING_KEY, body.routingKey.toString());
View Full Code Here


                throw new JMException("Queue \"" + queueName + "\" is not registered with the exchange.");
            }

            try
            {
                queue.bind(DirectExchange.this, new AMQShortString(binding), null);
            }
            catch (AMQException ex)
            {
                throw new MBeanException(ex);
            }
View Full Code Here

                throw body.getConnectionException(AMQConstant.ACCESS_REFUSED, "Permission denied");
            }

            if (!exch.isBound(routingKey, body.getArguments(), queue))
            {
                queue.bind(exch, routingKey, body.getArguments());
            }
        }
        catch (AMQInvalidRoutingKeyException rke)
        {
            throw body.getChannelException(AMQConstant.INVALID_ROUTING_KEY, routingKey.toString());
View Full Code Here

            AMQShortString routingKey = new AMQShortString(String.valueOf(routingKeyNameObj));
            if (_logger.isInfoEnabled())
            {
                _logger.info("Binding queue:" + queue + " with routing key '" + routingKey + "' to exchange:" + this);
            }
            queue.bind(exchange, routingKey, null);
        }

        if (exchange != _exchangeRegistry.getDefaultExchange())
        {
            queue.bind(_exchangeRegistry.getDefaultExchange(), queue.getName(), null);
View Full Code Here

            queue.bind(exchange, routingKey, null);
        }

        if (exchange != _exchangeRegistry.getDefaultExchange())
        {
            queue.bind(_exchangeRegistry.getDefaultExchange(), queue.getName(), null);
        }
    }

    public String getName()
    {
View Full Code Here

                    queueRegistry.registerQueue(queue);
                    if (autoRegister)
                    {
                        Exchange defaultExchange = exchangeRegistry.getDefaultExchange();

                        queue.bind(defaultExchange, queueName, null);
                        _logger.info("Queue " + queueName + " bound to default exchange(" + defaultExchange.getName() + ")");
                    }
                }
            }
            else if (queue.getOwner() != null && !session.getContextKey().equals(queue.getOwner()))
View Full Code Here

                        byte[] argumentBytes = arguments.getBytes(0, (int) arguments.length());
                        ByteBuffer buf = ByteBuffer.wrap(argumentBytes);
                        argumentsFT = new FieldTable(buf,arguments.length());
                    }

                    queue.bind(exchange, bindingKey == null ? null : new AMQShortString(bindingKey), argumentsFT);

                }
            }
        }
        finally
View Full Code Here

        if (queueRegistry.getQueue(_name) != null) {
            throw new IllegalStateException("Queue " + name + " already exists");
        }
        AMQQueue queue = new AMQQueue(_name, false, null, false, virtualHost);
        queueRegistry.registerQueue(queue);
        queue.bind(_name, null, virtualHost.getExchangeRegistry().getExchange(exchangeName));
    }
   
    public static void deleteQueue(VirtualHost virtualHost, String name) throws AMQException {
        AMQShortString _name = new AMQShortString(name);
        AMQQueue queue = virtualHost.getQueueRegistry().getQueue(_name);
View Full Code Here

                for(Object routingKeyNameObj : routingKeys)
                {
                    AMQShortString routingKey = new AMQShortString(String.valueOf(routingKeyNameObj));
                   

                    queue.bind(exchange, routingKey, null);


                    _logger.info("Queue '" + queue.getName() + "' bound to exchange:" + exchangeName + " RK:'" + routingKey + "'");
                }
View Full Code Here

                    _logger.info("Queue '" + queue.getName() + "' bound to exchange:" + exchangeName + " RK:'" + routingKey + "'");
                }

                if(exchange != virtualHost.getExchangeRegistry().getDefaultExchange())
                {
                    queue.bind(virtualHost.getExchangeRegistry().getDefaultExchange(), queue.getName(), null);
                }
            }

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