Examples of Broker


Examples of org.apache.qpid.server.model.Broker

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

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

        assertNotNull(broker);
        assertEquals(_brokerId, broker.getId());
        assertEquals(Collections.singletonList(_authenticationProvider1), broker.getAuthenticationProviders());
    }
View Full Code Here

Examples of org.apache.qpid.server.model.Broker

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

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

        assertNotNull(broker);
        assertEquals("Unexpected number of authentication providers", 2, broker.getAuthenticationProviders().size());

        Collection<Port> ports = broker.getPorts();
        assertEquals("Unexpected number of ports", 2, ports.size());
        assertTrue(ports.contains(port1));
        assertTrue(ports.contains(port2));
    }
View Full Code Here

Examples of org.apache.qpid.server.model.Broker

        _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);
        assertEquals(_brokerId, broker.getId());
        assertEquals(Collections.singletonList(groupProvider), broker.getGroupProviders());
    }
View Full Code Here

Examples of org.apache.qpid.server.model.Broker

        _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);
        assertEquals(_brokerId, broker.getId());
        assertEquals(Collections.singleton(plugin), new HashSet<ConfiguredObject>(broker.getChildren(Plugin.class)));
    }
View Full Code Here

Examples of org.apache.qpid.server.model.Broker

        _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);
        assertEquals(_brokerId, broker.getId());
        assertEquals(Collections.singleton(keyStore), new HashSet<ConfiguredObject>(broker.getChildren(KeyStore.class)));
    }
View Full Code Here

Examples of org.apache.qpid.server.model.Broker

        _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);
        assertEquals(_brokerId, broker.getId());
        assertEquals(Collections.singleton(trustStore), new HashSet<ConfiguredObject>(broker.getChildren(TrustStore.class)));
    }
View Full Code Here

Examples of org.apache.qpid.server.model.Broker

    public void testCreate()
    {
        StatisticsGatherer statisticsGatherer = mock(StatisticsGatherer.class);
        SecurityManager securityManager = mock(SecurityManager.class);
        ConfigurationEntry entry = mock(ConfigurationEntry.class);
        Broker parent = mock(Broker.class);
        when(parent.getAttribute(Broker.VIRTUALHOST_HOUSEKEEPING_CHECK_PERIOD)).thenReturn(3000l);
        when(parent.getSecurityManager()).thenReturn(securityManager);

        VirtualHostRecoverer recoverer = new VirtualHostRecoverer(statisticsGatherer);
        Map<String, Object> attributes = new HashMap<String, Object>();
        String name = getName();
        attributes.put(VirtualHost.NAME, name);
View Full Code Here

Examples of org.apache.qpid.server.model.Broker

    public void testCreateVirtualHostFromStoreConfigAtrributes()
    {
        StatisticsGatherer statisticsGatherer = mock(StatisticsGatherer.class);
        SecurityManager securityManager = mock(SecurityManager.class);
        ConfigurationEntry entry = mock(ConfigurationEntry.class);
        Broker parent = mock(Broker.class);
        when(parent.getAttribute(Broker.VIRTUALHOST_HOUSEKEEPING_CHECK_PERIOD)).thenReturn(3000l);
        when(parent.getSecurityManager()).thenReturn(securityManager);

        VirtualHostRecoverer recoverer = new VirtualHostRecoverer(statisticsGatherer);
        Map<String, Object> attributes = new HashMap<String, Object>();
        attributes.put(VirtualHost.NAME, getName());
        attributes.put(VirtualHost.TYPE, StandardVirtualHostFactory.TYPE);
View Full Code Here

Examples of org.apache.qpid.server.model.Broker

    public void checkMandatoryAttributesAreValidated(String[] mandatoryAttributes, Map<String, Object> attributes)
    {
        StatisticsGatherer statisticsGatherer = mock(StatisticsGatherer.class);
        SecurityManager securityManager = mock(SecurityManager.class);
        ConfigurationEntry entry = mock(ConfigurationEntry.class);
        Broker parent = mock(Broker.class);
        when(parent.getSecurityManager()).thenReturn(securityManager);
        VirtualHostRecoverer recoverer = new VirtualHostRecoverer(statisticsGatherer);

        for (String name : mandatoryAttributes)
        {
            Map<String, Object> copy = new HashMap<String, Object>(attributes);
View Full Code Here

Examples of org.apache.tuscany.sca.binding.notification.encoding.Broker

            } else if (eo instanceof ReplaceBrokerConnection) {
                ReplaceBrokerConnection rbc = (ReplaceBrokerConnection)eo;
                URL removedBrokerConsumerEpr = rbc.getRemovedBroker().getReference().getEndpointAddress().getAddress();
                if (rbc.getNeighbors() != null) {
                    int choice = rbc.getNeighbors().getBrokerSequence().size() - 1;
                    Broker chosenBroker = rbc.getNeighbors().getBrokerSequence().get(choice);
                    replaceBrokerSubscriber(removedBrokerConsumerEpr,
                                                    chosenBroker.getBrokerConsumerReference().getReference());
                    brokerManager.replaceConsumersBrokerConnection(notificationType,
                                                                   chosenBroker.getBrokerProducerReference().getReference());
                } else {
                    replaceBrokerSubscriber(removedBrokerConsumerEpr, null);
                }
            } else {
                throw new RuntimeException("Unknown encoding object");
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.