Package org.apache.qpid.server.configuration.updater

Examples of org.apache.qpid.server.configuration.updater.CurrentThreadTaskExecutor


    @Override
    public void setUp() throws Exception
    {
        super.setUp();
        _executor = new CurrentThreadTaskExecutor();
        _executor.start();
        _broker = BrokerTestHelper.createBrokerMock();
        _securityManager = mock(SecurityManager.class);
        when(_broker.getTaskExecutor()).thenReturn(_executor);
        when(_broker.getSecurityManager()).thenReturn(_securityManager);
View Full Code Here


        _facade = mock(ReplicatedEnvironmentFacade.class);

        _broker = BrokerTestHelper.createBrokerMock();

        _taskExecutor = new CurrentThreadTaskExecutor();
        _taskExecutor.start();
        when(_broker.getTaskExecutor()).thenReturn(_taskExecutor);

        _virtualHostNode = mock(BDBHAVirtualHostNode.class);
        _configStore = mock(DurableConfigurationStore.class);
View Full Code Here

        super(parentsMap(), attributes, newTaskExecutor(), TestModel.getInstance());
    }

    private static CurrentThreadTaskExecutor newTaskExecutor()
    {
        CurrentThreadTaskExecutor currentThreadTaskExecutor = new CurrentThreadTaskExecutor();
        currentThreadTaskExecutor.start();
        return currentThreadTaskExecutor;
    }
View Full Code Here

    protected void setUp()
    {
        _count++;
        _queue = mock(AMQQueue.class);
        TaskExecutor executor = new CurrentThreadTaskExecutor();
        VirtualHostImpl vhost = mock(VirtualHostImpl.class);
        when(_queue.getVirtualHost()).thenReturn(vhost);
        when(_queue.getModel()).thenReturn(BrokerModel.getInstance());
        when(_queue.getTaskExecutor()).thenReturn(executor);
        when(vhost.getSecurityManager()).thenReturn(mock(org.apache.qpid.server.security.SecurityManager.class));
View Full Code Here

        _user1 = "user1";
        _user2 = "user2";
        _preferencesFile = TestFileUtils.createTempFile(this, ".prefs.json", TEST_PREFERENCES);

        _broker = BrokerTestHelper.createBrokerMock();
        _taskExecutor = new CurrentThreadTaskExecutor();
        _taskExecutor.start();
        when(_authenticationProvider.getTaskExecutor()).thenReturn(_taskExecutor);

        when(_authenticationProvider.getParent(Broker.class)).thenReturn(_broker);
        ConfiguredObjectFactory objectFactory = _broker.getObjectFactory();
View Full Code Here

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

        _taskExecutor = new CurrentThreadTaskExecutor();
        _taskExecutor.start();
        _virtualHost = mock(VirtualHostImpl.class);
        SecurityManager securityManager = mock(SecurityManager.class);
        when(_virtualHost.getSecurityManager()).thenReturn(securityManager);
        when(_virtualHost.getEventLogger()).thenReturn(new EventLogger());
View Full Code Here

        Map<String,Object> attributes = new HashMap<String, Object>();
        attributes.put(Exchange.ID, UUID.randomUUID());
        attributes.put(Exchange.NAME, "test");
        attributes.put(Exchange.DURABLE, false);

        _taskExecutor = new CurrentThreadTaskExecutor();
        _taskExecutor.start();
        _virtualHost = mock(VirtualHostImpl.class);
        SecurityManager securityManager = mock(SecurityManager.class);
        when(_virtualHost.getSecurityManager()).thenReturn(securityManager);
        when(_virtualHost.getEventLogger()).thenReturn(new EventLogger());
View Full Code Here

        ConfiguredObjectFactoryImpl factory = new ConfiguredObjectFactoryImpl(BrokerModel.getInstance());

        Broker broker = mock(Broker.class);
        when(broker.getObjectFactory()).thenReturn(factory);
        when(broker.getModel()).thenReturn(factory.getModel());
        TaskExecutor executor = new CurrentThreadTaskExecutor();
        when(broker.getTaskExecutor()).thenReturn(executor);

        final FileTrustStore trustStore = new FileTrustStoreImpl(attributes, broker);
        trustStore.open();
        assertNotNull("Trust store configured object is not created", trustStore);
View Full Code Here

    {
        super.setUp();
        _rootId = UUID.randomUUID();
        _portEntryId = UUID.randomUUID();
        _store = mock(DurableConfigurationStore.class);
        _taskExecutor = new CurrentThreadTaskExecutor();
        _taskExecutor.start();

        _systemConfig = new JsonSystemConfigImpl(_taskExecutor, mock(EventLogger.class),
                                               mock(LogRecorder.class), new BrokerOptions());
View Full Code Here

        brokerAttributes.put("defaultVirtualHost", "test");
        brokerAttributes.put("modelVersion", "1.3");
        brokerAttributes.put("name", "Broker");

        _brokerRecord = new ConfiguredObjectRecordImpl(UUID.randomUUID(), "Broker", brokerAttributes);
        _taskExecutor = new CurrentThreadTaskExecutor();
        _taskExecutor.start();
        _systemConfig = new JsonSystemConfigImpl(_taskExecutor,
                                               mock(EventLogger.class),
                                               mock(LogRecorder.class),
                                               new BrokerOptions());
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.configuration.updater.CurrentThreadTaskExecutor

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.