Examples of AMQBrokerDetails


Examples of org.apache.qpid.client.AMQBrokerDetails

            while (st.hasMoreTokens())
            {
                String broker = st.nextToken();

                _url.addBrokerDetails(new AMQBrokerDetails(broker));
            }

            _url.getOptions().remove(AMQConnectionURL.OPTIONS_BROKERLIST);
        }
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

Examples of org.apache.qpid.client.AMQBrokerDetails

    }

    public void testOverridingSsl() throws URLSyntaxException
    {
        String brokerURL = "tcp://localhost:5672?ssl='true'";
        AMQBrokerDetails broker = new AMQBrokerDetails(brokerURL);

        assertTrue("value should be true", Boolean.valueOf(broker.getProperty(BrokerDetails.OPTIONS_SSL)));

        brokerURL = "tcp://localhost:5672?ssl='false''&maxprefetch='1'";
        broker = new AMQBrokerDetails(brokerURL);

        assertFalse("value should be false", Boolean.valueOf(broker.getProperty(BrokerDetails.OPTIONS_SSL)));
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQBrokerDetails

    }

    public void testHeartbeatDefaultsToNull() throws Exception
    {
        String brokerURL = "tcp://localhost:5672";
        AMQBrokerDetails broker = new AMQBrokerDetails(brokerURL);
        assertNull("unexpected default value for " + BrokerDetails.OPTIONS_HEARTBEAT, broker.getProperty(BrokerDetails.OPTIONS_HEARTBEAT));
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQBrokerDetails

    }

    public void testOverriddingHeartbeat() throws Exception
    {
        String brokerURL = "tcp://localhost:5672?heartbeat='60'";
        AMQBrokerDetails broker = new AMQBrokerDetails(brokerURL);
        assertEquals(60, Integer.parseInt(broker.getProperty(BrokerDetails.OPTIONS_HEARTBEAT)));

        assertEquals(Integer.valueOf(60), broker.buildConnectionSettings().getHeartbeatInterval08());
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQBrokerDetails

    @SuppressWarnings("deprecation")
  public void testLegacyHeartbeat() throws Exception
    {
        String brokerURL = "tcp://localhost:5672?idle_timeout='60000'";
        AMQBrokerDetails broker = new AMQBrokerDetails(brokerURL);
        assertEquals(60000, Integer.parseInt(broker.getProperty(BrokerDetails.OPTIONS_IDLE_TIMEOUT)));

        assertEquals(Integer.valueOf(60), broker.buildConnectionSettings().getHeartbeatInterval08());
    }
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.