Search in sources :

Example 21 with CurrentThreadTaskExecutor

use of org.apache.qpid.server.configuration.updater.CurrentThreadTaskExecutor in project qpid-broker-j by apache.

the class AclFileAccessControlProviderFactoryTest method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    _broker = mock(Broker.class);
    _objectFactory = new ConfiguredObjectFactoryImpl(BrokerModel.getInstance());
    when(_broker.getObjectFactory()).thenReturn(_objectFactory);
    when(_broker.getModel()).thenReturn(_objectFactory.getModel());
    when(_broker.getCategoryClass()).thenReturn(Broker.class);
    TaskExecutor taskExecutor = new CurrentThreadTaskExecutor();
    taskExecutor.start();
    when(_broker.getTaskExecutor()).thenReturn(taskExecutor);
    when(_broker.getChildExecutor()).thenReturn(taskExecutor);
    when(_broker.getEventLogger()).thenReturn(new EventLogger());
}
Also used : CurrentThreadTaskExecutor(org.apache.qpid.server.configuration.updater.CurrentThreadTaskExecutor) TaskExecutor(org.apache.qpid.server.configuration.updater.TaskExecutor) Broker(org.apache.qpid.server.model.Broker) EventLogger(org.apache.qpid.server.logging.EventLogger) CurrentThreadTaskExecutor(org.apache.qpid.server.configuration.updater.CurrentThreadTaskExecutor) ConfiguredObjectFactoryImpl(org.apache.qpid.server.model.ConfiguredObjectFactoryImpl)

Example 22 with CurrentThreadTaskExecutor

use of org.apache.qpid.server.configuration.updater.CurrentThreadTaskExecutor in project qpid-broker-j by apache.

the class TestSingletonImpl method newTaskExecutor.

private static CurrentThreadTaskExecutor newTaskExecutor() {
    CurrentThreadTaskExecutor currentThreadTaskExecutor = new CurrentThreadTaskExecutor();
    currentThreadTaskExecutor.start();
    return currentThreadTaskExecutor;
}
Also used : CurrentThreadTaskExecutor(org.apache.qpid.server.configuration.updater.CurrentThreadTaskExecutor)

Example 23 with CurrentThreadTaskExecutor

use of org.apache.qpid.server.configuration.updater.CurrentThreadTaskExecutor in project qpid-broker-j by apache.

the class ManagedAuthenticationManagerTestBase method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    _executor = new CurrentThreadTaskExecutor();
    _executor.start();
    _broker = BrokerTestHelper.createBrokerMock();
    when(_broker.getTaskExecutor()).thenReturn(_executor);
    when(_broker.getChildExecutor()).thenReturn(_executor);
    final Map<String, Object> attributesMap = new HashMap<String, Object>();
    attributesMap.put(AuthenticationProvider.NAME, getTestName());
    attributesMap.put(AuthenticationProvider.ID, UUID.randomUUID());
    _authManager = createAuthManager(attributesMap);
    _authManager.open();
}
Also used : HashMap(java.util.HashMap) CurrentThreadTaskExecutor(org.apache.qpid.server.configuration.updater.CurrentThreadTaskExecutor)

Aggregations

CurrentThreadTaskExecutor (org.apache.qpid.server.configuration.updater.CurrentThreadTaskExecutor)23 ConfiguredObject (org.apache.qpid.server.model.ConfiguredObject)8 HashMap (java.util.HashMap)7 PreferenceStore (org.apache.qpid.server.store.preferences.PreferenceStore)5 EventLogger (org.apache.qpid.server.logging.EventLogger)4 Broker (org.apache.qpid.server.model.Broker)4 ConfiguredObjectFactoryImpl (org.apache.qpid.server.model.ConfiguredObjectFactoryImpl)4 JsonSystemConfigImpl (org.apache.qpid.server.model.JsonSystemConfigImpl)4 DurableConfigurationStore (org.apache.qpid.server.store.DurableConfigurationStore)4 Principal (java.security.Principal)3 TaskExecutor (org.apache.qpid.server.configuration.updater.TaskExecutor)3 SystemConfig (org.apache.qpid.server.model.SystemConfig)3 AuthenticationProvider (org.apache.qpid.server.model.AuthenticationProvider)2 ConfiguredObjectFactory (org.apache.qpid.server.model.ConfiguredObjectFactory)2 Preference (org.apache.qpid.server.model.preferences.Preference)2 UserPreferencesImpl (org.apache.qpid.server.model.preferences.UserPreferencesImpl)2 AuthenticatedPrincipal (org.apache.qpid.server.security.auth.AuthenticatedPrincipal)2 GroupPrincipal (org.apache.qpid.server.security.group.GroupPrincipal)2 Subject (javax.security.auth.Subject)1 IllegalConfigurationException (org.apache.qpid.server.configuration.IllegalConfigurationException)1