Package org.apache.commons.configuration

Examples of org.apache.commons.configuration.XMLConfiguration$XMLFileConfigurationDelegate


        _connection = new InternalTestProtocolSession(_defaultVhost);

        _config = new TopicDeletePolicyConfiguration();

        XMLConfiguration config = new XMLConfiguration();

        _config.setConfiguration("", config);
    }
View Full Code Here


     */
    public void testConfigLoadingValidConfig()
    {
        SlowConsumerDetectionConfiguration config = new SlowConsumerDetectionConfiguration();

        XMLConfiguration xmlconfig = new XMLConfiguration();

        long DELAY=10;
        String TIMEUNIT=TimeUnit.MICROSECONDS.toString();
        xmlconfig.addProperty("delay", String.valueOf(DELAY));
        xmlconfig.addProperty("timeunit", TIMEUNIT);

        // Create a CompositeConfiguration as this is what the broker uses
        CompositeConfiguration composite = new CompositeConfiguration();
        composite.addConfiguration(xmlconfig);

View Full Code Here

       */
      public void testConfigLoadingMissingTimeUnitDefaults()
      {
          SlowConsumerDetectionConfiguration config = new SlowConsumerDetectionConfiguration();

          XMLConfiguration xmlconfig = new XMLConfiguration();

          long DELAY=10;
          xmlconfig.addProperty("delay", String.valueOf(DELAY));

          // Create a CompositeConfiguration as this is what the broker uses
          CompositeConfiguration composite = new CompositeConfiguration();
          composite.addConfiguration(xmlconfig);
          try
View Full Code Here

     */
    public void testConfigLoadingValidConfigStrangeTimeUnit()
    {
        SlowConsumerDetectionConfiguration config = new SlowConsumerDetectionConfiguration();

        XMLConfiguration xmlconfig = new XMLConfiguration();

        long DELAY=10;

        xmlconfig.addProperty("delay", DELAY);
        xmlconfig.addProperty("timeunit", "MiCrOsEcOnDs");

        // Create a CompositeConfiguration as this is what the broker uses
        CompositeConfiguration composite = new CompositeConfiguration();
        composite.addConfiguration(xmlconfig);

View Full Code Here

     */
    public void testConfigLoadingInValidDelayString()
    {
        SlowConsumerDetectionConfiguration config = new SlowConsumerDetectionConfiguration();

        XMLConfiguration xmlconfig = new XMLConfiguration();

        xmlconfig.addProperty("delay", "ten");
        xmlconfig.addProperty("timeunit", TimeUnit.MICROSECONDS.toString());

        // Create a CompositeConfiguration as this is what the broker uses
        CompositeConfiguration composite = new CompositeConfiguration();
        composite.addConfiguration(xmlconfig);

View Full Code Here

     */
    public void testConfigLoadingInValidDelayNegative()
    {
        SlowConsumerDetectionConfiguration config = new SlowConsumerDetectionConfiguration();

        XMLConfiguration xmlconfig = new XMLConfiguration();

        xmlconfig.addProperty("delay", "-10");
        xmlconfig.addProperty("timeunit", TimeUnit.MICROSECONDS.toString());

        // Create a CompositeConfiguration as this is what the broker uses
        CompositeConfiguration composite = new CompositeConfiguration();
        composite.addConfiguration(xmlconfig);

View Full Code Here

     */
    public void testConfigLoadingInValidDelayZero()
    {
        SlowConsumerDetectionConfiguration config = new SlowConsumerDetectionConfiguration();

        XMLConfiguration xmlconfig = new XMLConfiguration();

        xmlconfig.addProperty("delay", "0");
        xmlconfig.addProperty("timeunit", TimeUnit.MICROSECONDS.toString());

        // Create a CompositeConfiguration as this is what the broker uses
        CompositeConfiguration composite = new CompositeConfiguration();
        composite.addConfiguration(xmlconfig);

View Full Code Here

     * */
    public void testConfigLoadingInValidMissingDelay()
    {
        SlowConsumerDetectionConfiguration config = new SlowConsumerDetectionConfiguration();

        XMLConfiguration xmlconfig = new XMLConfiguration();

        xmlconfig.addProperty("timeunit", TimeUnit.SECONDS.toString());

        // Create a CompositeConfiguration as this is what the broker uses
        CompositeConfiguration composite = new CompositeConfiguration();
        composite.addConfiguration(xmlconfig);
        try
View Full Code Here

    public void testConfigLoadingInValidTimeUnit()
    {
        SlowConsumerDetectionConfiguration config = new SlowConsumerDetectionConfiguration();

        String TIMEUNIT = "foo";
        XMLConfiguration xmlconfig = new XMLConfiguration();

        xmlconfig.addProperty("delay", "10");
        xmlconfig.addProperty("timeunit", TIMEUNIT);

        // Create a CompositeConfiguration as this is what the broker uses
        CompositeConfiguration composite = new CompositeConfiguration();
        composite.addConfiguration(xmlconfig);
        try
View Full Code Here

    private ConfigurationPlugin getPlainDatabaseConfig() throws ConfigurationException
    {
        final ConfigurationPlugin config = new PrincipalDatabaseAuthenticationManager.PrincipalDatabaseAuthenticationManagerConfiguration();

        XMLConfiguration xmlconfig = new XMLConfiguration();
        xmlconfig.addProperty("pd-auth-manager.principal-database.class", PlainPasswordFilePrincipalDatabase.class.getName());

        // Create a CompositeConfiguration as this is what the broker uses
        CompositeConfiguration composite = new CompositeConfiguration();
        composite.addConfiguration(xmlconfig);
        config.setConfiguration("security", xmlconfig);
View Full Code Here

TOP

Related Classes of org.apache.commons.configuration.XMLConfiguration$XMLFileConfigurationDelegate

Copyright © 2018 www.massapicom. 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.