Package org.apache.qpid.server.model

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


        brokerOptions.setConfigurationStoreLocation(configFile.getAbsolutePath());

        SystemConfigFactory configFactory =
                (new PluggableFactoryLoader<>(SystemConfigFactory.class)).get(_storeType);

        final SystemConfig parentObject = configFactory.newInstance(_taskExecutor,
                                                                   mock(EventLogger.class),
                                                                   mock(LogRecorder.class),
                                                                   brokerOptions);

        parentObject.open();
        DurableConfigurationStore configurationStore = parentObject.getConfigurationStore();
        configurationStore.closeConfigurationStore();

        final List<ConfiguredObjectRecord> initialRecords = new ArrayList<>();
        _store.visitConfiguredObjectRecords(new ConfiguredObjectRecordHandler()
        {
View Full Code Here


        }

        LogRecorder logRecorder = new LogRecorder();

        _taskExecutor.start();
        SystemConfig systemConfig = configFactory.newInstance(_taskExecutor, _eventLogger, logRecorder, options);
        systemConfig.open();
        DurableConfigurationStore store = systemConfig.getConfigurationStore();

        _applicationRegistry = new ApplicationRegistry(store, systemConfig);
        try
        {
            _applicationRegistry.initialise(options);
View Full Code Here

    public static Broker<?> createBrokerMock()
    {
        ConfiguredObjectFactory objectFactory = new ConfiguredObjectFactoryImpl(BrokerModel.getInstance());
        EventLogger eventLogger = new EventLogger();

        SystemConfig systemConfig = mock(SystemConfig.class);
        when(systemConfig.getEventLogger()).thenReturn(eventLogger);
        when(systemConfig.getObjectFactory()).thenReturn(objectFactory);
        when(systemConfig.getModel()).thenReturn(objectFactory.getModel());
        when(systemConfig.getCategoryClass()).thenReturn(SystemConfig.class);

        SubjectCreator subjectCreator = mock(SubjectCreator.class);
        when(subjectCreator.getMechanisms()).thenReturn(Collections.<String>emptyList());

        Broker broker = mock(Broker.class);
        when(broker.getConnection_sessionCountLimit()).thenReturn(1);
        when(broker.getConnection_closeWhenNoRoute()).thenReturn(false);
        when(broker.getId()).thenReturn(UUID.randomUUID());
        when(broker.getSubjectCreator(any(SocketAddress.class), anyBoolean())).thenReturn(subjectCreator);
        when(broker.getSecurityManager()).thenReturn(new SecurityManager(broker, false));
        when(broker.getObjectFactory()).thenReturn(objectFactory);
        when(broker.getModel()).thenReturn(objectFactory.getModel());
        when(broker.getModelVersion()).thenReturn(BrokerModel.MODEL_VERSION);
        when(broker.getEventLogger()).thenReturn(eventLogger);
        when(broker.getCategoryClass()).thenReturn(Broker.class);
        when(broker.getParent(SystemConfig.class)).thenReturn(systemConfig);

        when(broker.getTaskExecutor()).thenReturn(TASK_EXECUTOR);
        when(systemConfig.getTaskExecutor()).thenReturn(TASK_EXECUTOR);
        return broker;
    }
View Full Code Here

        super.setUp();

        EventLogger eventLogger = mock(EventLogger.class);
        SecurityManager securityManager = mock(SecurityManager.class);
        TaskExecutor executor = CurrentThreadTaskExecutor.newStartedInstance();
        SystemConfig systemConfig = mock(SystemConfig.class);
        ConfiguredObjectFactory objectFactory = new ConfiguredObjectFactoryImpl(BrokerModel.getInstance());
        when(systemConfig.getObjectFactory()).thenReturn(objectFactory);
        when(systemConfig.getModel()).thenReturn(objectFactory.getModel());
        when(systemConfig.getEventLogger()).thenReturn(eventLogger);
        when(systemConfig.getTaskExecutor()).thenReturn(executor);

        Broker broker = mock(Broker.class);
        when(broker.getObjectFactory()).thenReturn(objectFactory);
        when(broker.getModel()).thenReturn(objectFactory.getModel());
        when(broker.getSecurityManager()).thenReturn(securityManager);
View Full Code Here

    @Override
    public void setUp() throws Exception
    {
        super.setUp();

        SystemConfig systemConfig = mock(SystemConfig.class);
        when(systemConfig.getEventLogger()).thenReturn(mock(EventLogger.class));
        Broker<?> broker = mock(Broker.class);
        when(broker.getParent(SystemConfig.class)).thenReturn(systemConfig);
        when(broker.getSecurityManager()).thenReturn(new SecurityManager(broker, false));

        _taskExecutor = new TaskExecutorImpl();
View Full Code Here

    public static Broker<?> createBrokerMock()
    {
        ConfiguredObjectFactory objectFactory = new ConfiguredObjectFactoryImpl(BrokerModel.getInstance());
        EventLogger eventLogger = new EventLogger();

        SystemConfig systemConfig = mock(SystemConfig.class);
        when(systemConfig.getEventLogger()).thenReturn(eventLogger);
        when(systemConfig.getObjectFactory()).thenReturn(objectFactory);
        when(systemConfig.getModel()).thenReturn(objectFactory.getModel());
        when(systemConfig.getCategoryClass()).thenReturn(SystemConfig.class);

        SubjectCreator subjectCreator = mock(SubjectCreator.class);
        when(subjectCreator.getMechanisms()).thenReturn(Collections.<String>emptyList());

        Broker broker = mock(Broker.class);
        when(broker.getConnection_sessionCountLimit()).thenReturn(1);
        when(broker.getConnection_closeWhenNoRoute()).thenReturn(false);
        when(broker.getId()).thenReturn(UUID.randomUUID());
        when(broker.getSubjectCreator(any(SocketAddress.class), anyBoolean())).thenReturn(subjectCreator);
        when(broker.getSecurityManager()).thenReturn(new SecurityManager(broker, false));
        when(broker.getObjectFactory()).thenReturn(objectFactory);
        when(broker.getModel()).thenReturn(objectFactory.getModel());
        when(broker.getModelVersion()).thenReturn(BrokerModel.MODEL_VERSION);
        when(broker.getEventLogger()).thenReturn(eventLogger);
        when(broker.getCategoryClass()).thenReturn(Broker.class);
        when(broker.getParent(SystemConfig.class)).thenReturn(systemConfig);
        when(broker.getContextValue(eq(Long.class), eq(Broker.CHANNEL_FLOW_CONTROL_ENFORCEMENT_TIMEOUT))).thenReturn(0l);

        when(broker.getTaskExecutor()).thenReturn(TASK_EXECUTOR);
        when(systemConfig.getTaskExecutor()).thenReturn(TASK_EXECUTOR);
        return broker;
    }
View Full Code Here

        brokerOptions.setConfigurationStoreLocation(configFile.getAbsolutePath());

        SystemConfigFactory configFactory =
                (new PluggableFactoryLoader<>(SystemConfigFactory.class)).get(_storeType);

        final SystemConfig parentObject = configFactory.newInstance(_taskExecutor,
                                                                   mock(EventLogger.class),
                                                                   mock(LogRecorder.class),
                                                                   brokerOptions,
                                                                   mock(BrokerShutdownProvider.class));

        parentObject.open();
        DurableConfigurationStore configurationStore = parentObject.getConfigurationStore();
        configurationStore.closeConfigurationStore();

        final List<ConfiguredObjectRecord> initialRecords = new ArrayList<>();
        _store.visitConfiguredObjectRecords(new ConfiguredObjectRecordHandler()
        {
View Full Code Here


        LogRecorder logRecorder = new LogRecorder();

        _taskExecutor.start();
        SystemConfig systemConfig = configFactory.newInstance(_taskExecutor, _eventLogger, logRecorder, options, this);
        systemConfig.open();
        DurableConfigurationStore store = systemConfig.getConfigurationStore();

        _applicationRegistry = new ApplicationRegistry(store, systemConfig);
        try
        {
            _applicationRegistry.initialise(options);
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.model.SystemConfig

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.