Package org.apache.qpid.server.configuration

Examples of org.apache.qpid.server.configuration.RecovererProvider


            _taskExecutor = new TaskExecutor();
            _taskExecutor.start();

            StoreConfigurationChangeListener storeChangeListener = new StoreConfigurationChangeListener(_store);
            RecovererProvider provider = new DefaultRecovererProvider((StatisticsGatherer)this, _virtualHostRegistry, _logRecorder, _rootMessageLogger, _taskExecutor, brokerOptions, storeChangeListener);
            ConfiguredObjectRecoverer<? extends ConfiguredObject> brokerRecoverer =  provider.getRecoverer(Broker.class.getSimpleName());
            _broker = (Broker) brokerRecoverer.create(provider, _store.getRootEntry());

            _virtualHostRegistry.setDefaultVirtualHostName((String)_broker.getAttribute(Broker.DEFAULT_VIRTUAL_HOST));

            initialiseStatisticsReporting();
View Full Code Here


        when(virtualHostEntry.getType()).thenReturn(typeName);
        _brokerEntryChildren.put(typeName, Arrays.asList(virtualHostEntry));
        final VirtualHost virtualHost = mock(VirtualHost.class);
        when(virtualHost.getName()).thenReturn("test");

        RecovererProvider recovererProvider = createRecoveryProvider(new ConfigurationEntry[] { virtualHostEntry, _authenticationProviderEntry1 },
                new ConfiguredObject[] { virtualHost, _authenticationProvider1 });
        Broker broker = _brokerRecoverer.create(recovererProvider, _brokerEntry);
        assertNotNull(broker);
        assertEquals(_brokerId, broker.getId());
View Full Code Here

        when(virtualHostEntry.getType()).thenReturn(typeName);
        _brokerEntryChildren.put(typeName, Arrays.asList(virtualHostEntry));

        final VirtualHost virtualHost = mock(VirtualHost.class);

        RecovererProvider recovererProvider = createRecoveryProvider(new ConfigurationEntry[]{virtualHostEntry, _authenticationProviderEntry1},
                                                                     new ConfiguredObject[]{virtualHost, _authenticationProvider1});

        Broker broker = _brokerRecoverer.create(recovererProvider, _brokerEntry);

        assertNotNull(broker);
View Full Code Here

    {
        ConfigurationEntry portEntry = mock(ConfigurationEntry.class);
        Port port = mock(Port.class);
        _brokerEntryChildren.put(Port.class.getSimpleName(), Arrays.asList(portEntry));

        RecovererProvider recovererProvider = createRecoveryProvider(new ConfigurationEntry[]{portEntry, _authenticationProviderEntry1},
                                                                     new ConfiguredObject[]{port, _authenticationProvider1});

        Broker broker = _brokerRecoverer.create(recovererProvider, _brokerEntry);

        assertNotNull(broker);
View Full Code Here

        assertEquals(Collections.singletonList(port), broker.getPorts());
    }

    public void testCreateBrokerWithOneAuthenticationProvider()
    {
        RecovererProvider recovererProvider = createRecoveryProvider(new ConfigurationEntry[]{_authenticationProviderEntry1},
                                                                     new ConfiguredObject[]{_authenticationProvider1});

        Broker broker = _brokerRecoverer.create(recovererProvider, _brokerEntry);

        assertNotNull(broker);
View Full Code Here

        when(port2.getName()).thenReturn("port2");
        when(port2.getPort()).thenReturn(5672);
        when(port2.getAttribute(Port.AUTHENTICATION_PROVIDER)).thenReturn("authenticationProvider2");
        _brokerEntryChildren.put(Port.class.getSimpleName(), Arrays.asList(portEntry1, portEntry2));

        RecovererProvider recovererProvider = createRecoveryProvider(
                new ConfigurationEntry[]{portEntry1, portEntry2, authenticationProviderEntry2, _authenticationProviderEntry1},
                new ConfiguredObject[]{port1, port2, authenticationProvider2, _authenticationProvider1});

        Broker broker = _brokerRecoverer.create(recovererProvider, _brokerEntry);
View Full Code Here

    {
        ConfigurationEntry groupProviderEntry = mock(ConfigurationEntry.class);
        GroupProvider groupProvider = mock(GroupProvider.class);
        _brokerEntryChildren.put(GroupProvider.class.getSimpleName(), Arrays.asList(groupProviderEntry));

        RecovererProvider recovererProvider = createRecoveryProvider(new ConfigurationEntry[]{groupProviderEntry, _authenticationProviderEntry1},
                                                                     new ConfiguredObject[]{groupProvider, _authenticationProvider1});

        Broker broker = _brokerRecoverer.create(recovererProvider, _brokerEntry);

        assertNotNull(broker);
View Full Code Here

    {
        ConfigurationEntry pluginEntry = mock(ConfigurationEntry.class);
        Plugin plugin = mock(Plugin.class);
        _brokerEntryChildren.put(Plugin.class.getSimpleName(), Arrays.asList(pluginEntry));

        RecovererProvider recovererProvider = createRecoveryProvider(new ConfigurationEntry[]{pluginEntry, _authenticationProviderEntry1},
                                                                     new ConfiguredObject[]{plugin, _authenticationProvider1});

        Broker broker = _brokerRecoverer.create(recovererProvider, _brokerEntry);

        assertNotNull(broker);
View Full Code Here

    {
        ConfigurationEntry pluginEntry = mock(ConfigurationEntry.class);
        KeyStore keyStore = mock(KeyStore.class);
        _brokerEntryChildren.put(KeyStore.class.getSimpleName(), Arrays.asList(pluginEntry));

        RecovererProvider recovererProvider = createRecoveryProvider(new ConfigurationEntry[]{pluginEntry, _authenticationProviderEntry1},
                                                                     new ConfiguredObject[]{keyStore, _authenticationProvider1});

        Broker broker = _brokerRecoverer.create(recovererProvider, _brokerEntry);

        assertNotNull(broker);
View Full Code Here

    {
        ConfigurationEntry pluginEntry = mock(ConfigurationEntry.class);
        TrustStore trustStore = mock(TrustStore.class);
        _brokerEntryChildren.put(TrustStore.class.getSimpleName(), Arrays.asList(pluginEntry));

        RecovererProvider recovererProvider = createRecoveryProvider(new ConfigurationEntry[]{pluginEntry, _authenticationProviderEntry1},
                                                                     new ConfiguredObject[]{trustStore, _authenticationProvider1});

        Broker broker = _brokerRecoverer.create(recovererProvider, _brokerEntry);

        assertNotNull(broker);
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.configuration.RecovererProvider

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.