Examples of AMQBrokerDetails


Examples of org.apache.qpid.client.AMQBrokerDetails

    }

    public void testDefaultConnectTimeout() throws URLSyntaxException
    {
        String brokerURL = "tcp://localhost:5672";
        AMQBrokerDetails broker = new AMQBrokerDetails(brokerURL);

        ConnectionSettings settings = broker.buildConnectionSettings();

        assertEquals("unexpected default connect timeout value", BrokerDetails.DEFAULT_CONNECT_TIMEOUT, settings.getConnectTimeout());
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQBrokerDetails

    {
        int timeout = 2 * BrokerDetails.DEFAULT_CONNECT_TIMEOUT;
        assertTrue(timeout != BrokerDetails.DEFAULT_CONNECT_TIMEOUT);

        String brokerURL = "tcp://localhost:5672?" + BrokerDetails.OPTIONS_CONNECT_TIMEOUT + "='" + timeout + "'";
        AMQBrokerDetails broker = new AMQBrokerDetails(brokerURL);

        ConnectionSettings settings = broker.buildConnectionSettings();

        assertEquals("unexpected connect timeout value", timeout, settings.getConnectTimeout());
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQBrokerDetails

    public void testMultiParameters() throws URLSyntaxException
    {
        String url = "tcp://localhost:5672?timeout='200',immediatedelivery='true'";

        AMQBrokerDetails broker = new AMQBrokerDetails(url);

        assertTrue(broker.getProperty("timeout").equals("200"));
        assertTrue(broker.getProperty("immediatedelivery").equals("true"));
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQBrokerDetails

    public void testTransportsDefaultToTCP() throws URLSyntaxException
    {
        String url = "localhost:5672";

        AMQBrokerDetails broker = new AMQBrokerDetails(url);
        assertTrue(broker.getTransport().equals("tcp"));
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQBrokerDetails

    public void testCheckDefaultPort() throws URLSyntaxException
    {
        String url = "tcp://localhost";

        AMQBrokerDetails broker = new AMQBrokerDetails(url);
        assertTrue(broker.getPort() == AMQBrokerDetails.DEFAULT_PORT);
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQBrokerDetails

    public void testBothDefaults() throws URLSyntaxException
    {
        String url = "localhost";

        AMQBrokerDetails broker = new AMQBrokerDetails(url);

        assertTrue(broker.getTransport().equals("tcp"));
        assertTrue(broker.getPort() == AMQBrokerDetails.DEFAULT_PORT);
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQBrokerDetails

    public void testWrongOptionSeparatorInBroker()
    {
        String url = "tcp://localhost:5672+option='value'";
        try
        {
            new AMQBrokerDetails(url);
        }
        catch (URLSyntaxException urise)
        {
            assertTrue(urise.getReason().equals("Illegal character in port number"));
        }
View Full Code Here

Examples of org.apache.qpid.client.AMQBrokerDetails

    }

    public void testToStringMasksKeyStorePassword() throws Exception
    {
        String url = "tcp://localhost:5672?key_store_password='password'";
        BrokerDetails details = new AMQBrokerDetails(url);

        String expectedToString = "tcp://localhost:5672?key_store_password='********'";
        String actualToString = details.toString();

        assertEquals("Unexpected toString", expectedToString, actualToString);
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQBrokerDetails

    }

    public void testToStringMasksTrustStorePassword() throws Exception
    {
        String url = "tcp://localhost:5672?trust_store_password='password'";
        BrokerDetails details = new AMQBrokerDetails(url);

        String expectedToString = "tcp://localhost:5672?trust_store_password='********'";
        String actualToString = details.toString();

        assertEquals("Unexpected toString", expectedToString, actualToString);
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQBrokerDetails

    }

    public void testDefaultSsl() throws URLSyntaxException
    {
        String brokerURL = "tcp://localhost:5672";
        AMQBrokerDetails broker = new AMQBrokerDetails(brokerURL);

        assertNull("default value should be null", broker.getProperty(BrokerDetails.OPTIONS_SSL));
    }
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.