Examples of AMQBindingURL


Examples of org.apache.qpid.url.AMQBindingURL

        _session = (AMQSession<?, ?>) _connection.createSession(true, Session.SESSION_TRANSACTED);
    }

    public void testQueueCannotBeReboundOnNonTopicExchange() throws Exception
    {
        runTestForNonTopicExhange(new AMQQueue(new AMQBindingURL("direct://amq.direct//" + getTestQueueName())));
        runTestForNonTopicExhange(new AMQQueue(new AMQBindingURL("fanout://amq.fanout//" + getTestQueueName()) + "?routingkey='"
                + getTestQueueName() + "'"));
    }
View Full Code Here

Examples of org.apache.qpid.url.AMQBindingURL

                + getTestQueueName() + "'"));
    }

    public void testQueueCanBeReboundOnTopicExchange() throws Exception
    {
        AMQQueue destination = new AMQQueue(new AMQBindingURL("topic://amq.topic//" + getTestQueueName() + "?routingkey='"
                + getTestQueueName() + "'"));
        setTestClientSystemProperty("qpid.default_mandatory", "false");
        runTestForTopicExchange(destination);

    }
View Full Code Here

Examples of org.apache.qpid.url.AMQBindingURL

    {
        AMQConnection con = (AMQConnection) getConnection("guest", "guest");
        AMQSession consumerSession = (AMQSession) con.createSession(false, Session.CLIENT_ACKNOWLEDGE);

        AMQHeadersExchange queue =
            new AMQHeadersExchange(new AMQBindingURL(
                    ExchangeDefaults.HEADERS_EXCHANGE_CLASS + "://" + ExchangeDefaults.HEADERS_EXCHANGE_NAME
                    + "/test/queue1?" + BindingURL.OPTION_ROUTING_KEY + "='F0000=1'"));

        FieldTable ft = new FieldTable();
        ft.setString("x-match", "any");
View Full Code Here

Examples of org.apache.qpid.url.AMQBindingURL

        {
            con = getConnection();

            AMQSession consumerSession = (AMQSession) con.createSession(false, Session.CLIENT_ACKNOWLEDGE);

            queue = new AMQHeadersExchange(new AMQBindingURL(ExchangeDefaults.HEADERS_EXCHANGE_CLASS + "://" + ExchangeDefaults.HEADERS_EXCHANGE_NAME + "/test/queue1?" + BindingURL.OPTION_ROUTING_KEY + "='F0000=1'"));

            FieldTable ft = new FieldTable();
            ft.setString("F1000", "1");
            consumerSession.declareAndBind(queue, ft);
View Full Code Here

Examples of org.apache.qpid.url.AMQBindingURL

            String origReplyToString = properties.getReplyTo().asString();
            ReplyTo replyTo = new ReplyTo();
            // if the string looks like a binding URL, then attempt to parse it...
            try
            {
                AMQBindingURL burl = new AMQBindingURL(origReplyToString);
                AMQShortString routingKey = burl.getRoutingKey();
                if(routingKey != null)
                {
                    replyTo.setRoutingKey(routingKey.asString());
                }

                AMQShortString exchangeName = burl.getExchangeName();
                if(exchangeName != null)
                {
                    replyTo.setExchange(exchangeName.asString());
                }
            }
View Full Code Here

Examples of org.apache.qpid.url.AMQBindingURL

            }
        });

        AMQSession_0_8 session = new AMQSession_0_8(_connection, 1, true, 0, 1, 1);

        AMQBindingURL bindingURL = new AMQBindingURL("topic://amq.topic//?routingkey='testTopic'");
        AMQQueue queue = new AMQQueue(bindingURL);

        assertEquals("Unexpected queue name", AMQShortString.EMPTY_STRING, queue.getAMQQueueName());

        session.declareQueue(queue, true);
View Full Code Here

Examples of org.apache.qpid.url.AMQBindingURL

        _session = (AMQSession<?, ?>) _connection.createSession(true, Session.SESSION_TRANSACTED);
    }

    public void testDeclareAndBindWhenQueueIsNotSpecifiedInDestinationUrl() throws Exception
    {
        AMQQueue destination = new AMQQueue(new AMQBindingURL("topic://amq.topic//?routingkey='testTopic'"));

        assertEquals("Queue name is generated in parser", AMQShortString.EMPTY_STRING, destination.getAMQQueueName());

        _session.declareAndBind(destination, FieldTable.convertToFieldTable(Collections.<String, Object> emptyMap()));
View Full Code Here

Examples of org.apache.qpid.url.AMQBindingURL

    {
        _destSyntax = getDestType(str);
        str = stripSyntaxPrefix(str);
        if (_destSyntax == DestSyntax.BURL)
        {   
            getInfoFromBindingURL(new AMQBindingURL(str));           
        }
        else
        {
            this._address = createAddressFromString(str);
            try
View Full Code Here

Examples of org.apache.qpid.url.AMQBindingURL

    {
         DestSyntax syntax = getDestType(str);
         str = stripSyntaxPrefix(str);
         if (syntax == DestSyntax.BURL)
         {         
             return createDestination(new AMQBindingURL(str));        
         }
         else
         {
             Address address = createAddressFromString(str);
             return new AMQAnyDestination(address);
View Full Code Here

Examples of org.apache.qpid.url.AMQBindingURL

                String origReplyToString = properties.getReplyTo().asString();
                ReplyTo replyTo = new ReplyTo();
                // if the string looks like a binding URL, then attempt to parse it...
                try
                {
                    AMQBindingURL burl = new AMQBindingURL(origReplyToString);
                    AMQShortString routingKey = burl.getRoutingKey();
                    if(routingKey != null)
                    {
                        replyTo.setRoutingKey(routingKey.asString());
                    }

                    AMQShortString exchangeName = burl.getExchangeName();
                    if(exchangeName != null)
                    {
                        replyTo.setExchange(exchangeName.asString());
                    }
                }
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.