Examples of AMQConnectionURL


Examples of org.apache.qpid.client.AMQConnectionURL

            "?ssl='true'&trust_store='%s'&trust_store_password='%s''";

            url = String.format(url,QpidBrokerTestCase.DEFAULT_SSL_PORT,TRUSTSTORE,TRUSTSTORE_PASSWORD);
            try
            {
                Connection con = getConnection(new AMQConnectionURL(url));
                if(!shouldSucceed)
                {
                    fail("Connection succeeded, expected exception was not thrown");
                }
                else
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionURL

            "'";

            url = String.format(url,QpidBrokerTestCase.DEFAULT_SSL_PORT,
                    KEYSTORE,KEYSTORE_PASSWORD,TRUSTSTORE,TRUSTSTORE_PASSWORD);

            Connection con = getConnection(new AMQConnectionURL(url));
            assertNotNull("connection should be successful", con);
            Session ssn = con.createSession(false,Session.AUTO_ACKNOWLEDGE);
            assertNotNull("create session should be successful", ssn);

            url = "amqp://guest:guest@test/?brokerlist='tcp://localhost:%s'";

            url = String.format(url,QpidBrokerTestCase.DEFAULT_SSL_PORT);

            con = getConnection(new AMQConnectionURL(url));
            assertNotNull("connection should be successful", con);
            ssn = con.createSession(false,Session.AUTO_ACKNOWLEDGE);
            assertNotNull("create session should be successful", ssn);

        }
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionURL

     * Convenience method to build an {@link AMQConnectionURL} with the right parameters.
     */
    public AMQConnectionURL createConnectionURL(String vhost, String username, String password) throws URLSyntaxException
    {
        String url = "amqp://" + username + ":" + password + "@clientid/" + vhost + "?brokerlist='" + getBroker() + "?retries='0''";
        return new AMQConnectionURL(url);
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionURL

        // Start broker
        super.setUp();
       
        // Connect to broker
        String broker = ("tcp://localhost:" + DEFAULT_PORT);
        ConnectionURL url = new AMQConnectionURL("amqp://guest:guest@clientid/test?brokerlist='" + broker + "'&maxprefetch='1'");
        _con = (AMQConnection) getConnection(url);
        _con.setExceptionListener(this);
        _con.start();
       
        // Create queue
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionURL

        }
        else
        {
            url = String.format(url, ":", String.valueOf(QpidBrokerTestCase.DEFAULT_SSL_PORT));
        }
        return getConnection(new AMQConnectionURL(url));
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionURL

        AMQConnection conn = null;
        try
        {
            BrokerDetails broker = getBroker();
            broker.setProperty(BrokerDetails.OPTIONS_RETRY, "1");
            ConnectionURL url = new AMQConnectionURL("amqp://guest:guest@clientid/test?brokerlist='"
                                     + broker
                                     + "'&defaultQueueExchange='test.direct'"
                                     + "&defaultTopicExchange='test.topic'"
                                     + "&temporaryQueueExchange='tmp.direct'"
                                     + "&temporaryTopicExchange='tmp.topic'");

            System.err.println(url.toString());
            conn = new AMQConnection(url);


            AMQSession sess = (AMQSession) conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionURL

            startBroker(port, testConfiguration, testVirtualhosts);
            revertSystemProperties();
        }

        _connectionURL = new AMQConnectionURL(generateUrlString(numBrokers));

        _connection = getConnection(_connectionURL);
        ((AMQConnection) _connection).setConnectionListener(this);
        _failoverComplete = new CountDownLatch(1);
        _failoverStarted = new CountDownLatch(1);
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionURL

            "'";
           
            url = String.format(url,QpidBrokerTestCase.DEFAULT_SSL_PORT,
                    KEYSTORE,KEYSTORE_PASSWORD,TRUSTSTORE,TRUSTSTORE_PASSWORD);

            Connection con = getConnection(new AMQConnectionURL(url));
            assertNotNull("connection should be successful", con);
            Session ssn = con.createSession(false,Session.AUTO_ACKNOWLEDGE);
            assertNotNull("create session should be successful", ssn);
        }
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionURL

            //Create URL enabling SSL at the connection rather than brokerlist level
            String url = "amqp://guest:guest@test/?ssl='true'&brokerlist='tcp://localhost:%s'";
            url = String.format(url,QpidBrokerTestCase.DEFAULT_SSL_PORT);

            Connection con = getConnection(new AMQConnectionURL(url));
            assertNotNull("connection should be successful", con);
            Session ssn = con.createSession(false,Session.AUTO_ACKNOWLEDGE);
            assertNotNull("create session should be successful", ssn);
        }
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionURL

            //Create URL enabling SSL at the connection, overriding the false at the brokerlist level
            String url = "amqp://guest:guest@test/?ssl='true'&brokerlist='tcp://localhost:%s?ssl='false''";
            url = String.format(url,QpidBrokerTestCase.DEFAULT_SSL_PORT);

            Connection con = getConnection(new AMQConnectionURL(url));
            assertNotNull("connection should be successful", con);
            Session ssn = con.createSession(false,Session.AUTO_ACKNOWLEDGE);
            assertNotNull("create session should be successful", ssn);
        }
    }
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.