Package org.apache.qpid.server.registry

Examples of org.apache.qpid.server.registry.ApplicationRegistry$StatisticsReportingTask


        if (options.isManagementMode())
        {
            store = new ManagementModeStoreHandler(store, options);
        }

        _applicationRegistry = new ApplicationRegistry(store);
        try
        {
            _applicationRegistry.initialise(options);
        }
        catch(Exception e)
View Full Code Here


        response.setHeader("Cache-Control","no-cache");
        response.setHeader("Pragma","no-cache");
        response.setDateHeader ("Expires", 0);

        ApplicationRegistry applicationRegistry = (ApplicationRegistry) ApplicationRegistry.getInstance();
        List<Map<String,Object>> logRecords = new ArrayList<Map<String, Object>>();

        for(LogRecorder.Record record : applicationRegistry.getLogRecorder())
        {
            logRecords.add(logRecordToObject(record));
        }

        final PrintWriter writer = response.getWriter();
View Full Code Here

                                    BrokerOptions.DEFAULT_LOG_CONFIG_FILE, qpidHome, false);

        configureLogging(logConfigFile, options.getLogWatchFrequency());

        ServerConfiguration serverConfig = new ServerConfiguration(configFile);
        ApplicationRegistry config = new ApplicationRegistry(serverConfig);
        if (options.getQpidWork() != null)
        {
            serverConfig.setQpidWork(options.getQpidWork());
        }
        if (options.getQpidHome() != null)
        {
            serverConfig.setQpidHome(options.getQpidHome());
        }
        updateManagementPorts(serverConfig, options.getJmxPortRegistryServer(), options.getJmxPortConnectorServer());

        ApplicationRegistry.initialise(config);

        // We have already loaded the BrokerMessages class by this point so we
        // need to refresh the locale setting incase we had a different value in
        // the configuration.
        BrokerMessages.reload();

        // AR.initialise() sets and removes its own actor so we now need to set the actor
        // for the remainder of the startup, and the default actor if the stack is empty
        CurrentActor.set(new BrokerActor(config.getCompositeStartupMessageLogger()));
        CurrentActor.setDefault(new BrokerActor(config.getRootMessageLogger()));
        GenericActor.setDefaultMessageLogger(config.getRootMessageLogger());

        try
        {
            Set<Integer> ports = new HashSet<Integer>(options.getPorts());
            if(ports.isEmpty())
View Full Code Here

        response.setHeader("Cache-Control","no-cache");
        response.setHeader("Pragma","no-cache");
        response.setDateHeader ("Expires", 0);

        ApplicationRegistry applicationRegistry = (ApplicationRegistry) ApplicationRegistry.getInstance();
        List<Map<String,Object>> logRecords = new ArrayList<Map<String, Object>>();

        for(LogRecorder.Record record : applicationRegistry.getLogRecorder())
        {
            logRecords.add(logRecordToObject(record));
        }

        final PrintWriter writer = response.getWriter();
View Full Code Here

        mainFile.deleteOnExit();
        writeConfigFile(mainFile, false, true, null, "test");

        // Load config
        ApplicationRegistry.remove();
        ApplicationRegistry reg = new ConfigurationFileApplicationRegistry(mainFile);
        ApplicationRegistry.initialise(reg);

        // Test config
        VirtualHostRegistry virtualHostRegistry = reg.getVirtualHostRegistry();
        String defaultVirtualHost = reg.getConfiguration().getDefaultVirtualHost();
        VirtualHost virtualHost = virtualHostRegistry.getVirtualHost("test");
        Exchange exchange = virtualHost.getExchangeRegistry().getExchange(new AMQShortString("test.topic"));

        assertEquals("Incorrect default host", "test", defaultVirtualHost);
        assertEquals("Incorrect virtualhost count", 1, virtualHostRegistry.getVirtualHosts().size());
View Full Code Here

        writeConfigFile(mainFile, false, false, vhostsFile, null);   
        writeVirtualHostsFile(vhostsFile, "test");

        // Load config
        ApplicationRegistry.remove();
        ApplicationRegistry reg = new ConfigurationFileApplicationRegistry(mainFile);
        ApplicationRegistry.initialise(reg);

        // Test config
        VirtualHostRegistry virtualHostRegistry = reg.getVirtualHostRegistry();
        String defaultVirtualHost = reg.getConfiguration().getDefaultVirtualHost();
        VirtualHost virtualHost = virtualHostRegistry.getVirtualHost("test");
        Exchange exchange = virtualHost.getExchangeRegistry().getExchange(new AMQShortString("test.topic"));

        assertEquals("Incorrect default host", "test", defaultVirtualHost);
        assertEquals("Incorrect virtualhost count", 1, virtualHostRegistry.getVirtualHosts().size());
View Full Code Here

        mainFile.deleteOnExit();
        writeConfigFile(mainFile, false, false, vhostsFile, null);

        // Load config
        ApplicationRegistry.remove();
        ApplicationRegistry reg = new ConfigurationFileApplicationRegistry(mainFile);
        ApplicationRegistry.initialise(reg);

        // Test config
        VirtualHostRegistry virtualHostRegistry = reg.getVirtualHostRegistry();

        assertEquals("Incorrect virtualhost count", 2, virtualHostRegistry.getVirtualHosts().size());
       
        // test topic host
        VirtualHost topicVirtualHost = virtualHostRegistry.getVirtualHost("topic");
View Full Code Here

       
        // Load config
        try
        {
            ApplicationRegistry.remove();
            ApplicationRegistry reg = new ConfigurationFileApplicationRegistry(mainFile);
            ApplicationRegistry.initialise(reg);
            fail("Different virtualhost XML configurations not allowed");
        }
        catch (ConfigurationException ce)
        {
View Full Code Here

       
        // Load config
        try
        {
            ApplicationRegistry.remove();
            ApplicationRegistry reg = new ConfigurationFileApplicationRegistry(mainFile);
            ApplicationRegistry.initialise(reg);
            fail("Multiple virtualhost XML configurations not allowed");
        }
        catch (ConfigurationException ce)
        {
View Full Code Here

        config.write("</broker>\n");
        config.close();

        // Load config
        ApplicationRegistry.remove();
        ApplicationRegistry registry = new ConfigurationFileApplicationRegistry(xml);
        ApplicationRegistry.initialise(registry);
        ServerConfiguration serverConfiguration = ApplicationRegistry.getInstance().getConfiguration();

        VirtualHostConfiguration test = serverConfiguration.getVirtualHostConfig("test");
        assertNotNull("Host 'test' is not found", test);
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.registry.ApplicationRegistry$StatisticsReportingTask

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.