Examples of AMQConnectionURL


Examples of org.apache.qpid.client.AMQConnectionURL

    }

    public void testConnectionURLOptionToStringMasksSslTrustStorePassword() throws URLSyntaxException
    {
        String url = "amqp://guest:guest@client/vhost?brokerlist='tcp://host:1234?trust_store_password='truststorepassword''";
        ConnectionURL connectionurl = new AMQConnectionURL(url);

        String expectedToString = "amqp://guest:********@client/vhost?brokerlist='tcp://host:1234?trust_store_password='********''";
        String actualToString = connectionurl.toString();
        assertEquals("Unexpected toString form", expectedToString, actualToString);
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionURL

    }

    public void testConnectionURLOptionToStringMasksSslKeyStorePassword() throws URLSyntaxException
    {
        String url = "amqp://guest:guest@client/vhost?brokerlist='tcp://host:1234?key_store_password='keystorepassword1';tcp://host:1235?key_store_password='keystorepassword2''";
        ConnectionURL connectionurl = new AMQConnectionURL(url);

        String expectedToString = "amqp://guest:********@client/vhost?brokerlist='tcp://host:1234?key_store_password='********';tcp://host:1235?key_store_password='********''";
        String actualToString = connectionurl.toString();
        assertEquals("Unexpected toString form", expectedToString, actualToString);
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionURL

     * Test for QPID-3662 to ensure the {@code toString()} representation is correct.
     */
    public void testConnectionURLOptionToStringWithMaxPreftech() throws URLSyntaxException
    {
        String url = "amqp://guest:guest@client/localhost?maxprefetch='1'&brokerlist='tcp://localhost:1234?tcp_nodelay='true''";
        ConnectionURL connectionurl = new AMQConnectionURL(url);

        String expectedToString = "amqp://guest:********@client/localhost?maxprefetch='1'&brokerlist='tcp://localhost:1234?tcp_nodelay='true''";
        String actualToString = connectionurl.toString();
        assertEquals("Unexpected toString form", expectedToString, actualToString);
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionURL

    public void testSingleTransportMultiOptionURL() throws URLSyntaxException
    {
        String url = "amqp://guest:guest@/test?brokerlist='tcp://localhost:5672?foo='jim'&bar='bob'&fred='jimmy'',routingkey='jim',timeout='200',immediatedelivery='true'";

        ConnectionURL connectionurl = new AMQConnectionURL(url);

        assertTrue(connectionurl.getFailoverMethod() == null);
        assertTrue(connectionurl.getUsername().equals("guest"));
        assertTrue(connectionurl.getPassword().equals("guest"));
        assertTrue(connectionurl.getVirtualHost().equals("/test"));

        assertTrue(connectionurl.getBrokerCount() == 1);

        BrokerDetails service = connectionurl.getBrokerDetails(0);

        assertTrue(service.getTransport().equals("tcp"));

        assertTrue(service.getHost().equals("localhost"));
        assertTrue(service.getPort() == 5672);

        assertTrue(connectionurl.getOption("routingkey").equals("jim"));
        assertTrue(connectionurl.getOption("timeout").equals("200"));
        assertTrue(connectionurl.getOption("immediatedelivery").equals("true"));
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionURL

    {
        String url = "amqp://user@?brokerlist='tcp://localhost:5672'";

        try
        {
            new AMQConnectionURL(url);
            fail("URL has no virtual host should not parse");
        }
        catch (URLSyntaxException e)
        {
            // This should occur.
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionURL

    public void testNoClientID() throws URLSyntaxException
    {
        String url = "amqp://user:@/test?brokerlist='tcp://localhost:5672'";

        ConnectionURL connectionurl = new AMQConnectionURL(url);

        assertTrue(connectionurl.getUsername().equals("user"));
        assertTrue(connectionurl.getPassword().equals(""));
        assertTrue(connectionurl.getVirtualHost().equals("/test"));

        assertTrue(connectionurl.getBrokerCount() == 1);
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionURL

    public void testClientIDWithUnderscore() throws URLSyntaxException
    {
        String url = "amqp://user:pass@client_id/test?brokerlist='tcp://localhost:5672'";

        ConnectionURL connectionurl = new AMQConnectionURL(url);

        assertTrue(connectionurl.getUsername().equals("user"));
        assertTrue(connectionurl.getPassword().equals("pass"));
        assertTrue(connectionurl.getVirtualHost().equals("/test"));
        assertTrue(connectionurl.getClientName().equals("client_id"));

        assertTrue(connectionurl.getBrokerCount() == 1);
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionURL

    public void testWrongOptionSeparatorInOptions()
    {
        String url = "amqp://guest:guest@/test?brokerlist='tcp://localhost:5672;tcp://localhost:5673'+failover='roundrobin'";
        try
        {
            new AMQConnectionURL(url);
            fail("URL Should not parse");
        }
        catch (URLSyntaxException urise)
        {
            assertTrue(urise.getReason().equals("Unterminated option. Possible illegal option separator:'+'"));
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionURL

    {
        String url = "amqp://clientID/test?brokerlist='tcp://localhost:5672;tcp://localhost:5673'";
        try
        {
            new AMQConnectionURL(url);
        }
        catch (URLSyntaxException urise)
        {
            fail("User information is optional in url");
        }
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionURL

    {
        String url = "amqp:///test?brokerlist='tcp://localhost:5672;tcp://localhost:5673'";
        try
        {
            new AMQConnectionURL(url);
        }
        catch (URLSyntaxException urise)
        {
            fail("User information is optional in url");
        }
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.