Examples of ConfiguredObjectFactoryImpl


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

        queueAttributes.put(Queue.ID, UUID.randomUUID());
        queueAttributes.put(Queue.NAME, "SimpleQueueEntryImplTest");
        final VirtualHostImpl virtualHost = mock(VirtualHostImpl.class);
        when(virtualHost.getSecurityManager()).thenReturn(mock(org.apache.qpid.server.security.SecurityManager.class));
        when(virtualHost.getEventLogger()).thenReturn(new EventLogger());
        ConfiguredObjectFactory factory = new ConfiguredObjectFactoryImpl(BrokerModel.getInstance());
        when(virtualHost.getObjectFactory()).thenReturn(factory);
        when(virtualHost.getModel()).thenReturn(factory.getModel());
        when(virtualHost.getTaskExecutor()).thenReturn(CurrentThreadTaskExecutor.newStartedInstance());
        StandardQueueImpl queue = new StandardQueueImpl(queueAttributes, virtualHost);
        queue.open();
        queueEntryList = queue.getEntries();
View Full Code Here

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

        queueAttributes.put(Queue.NAME, getName());
        queueAttributes.put(PriorityQueue.PRIORITIES, 10);
        final VirtualHostImpl virtualHost = mock(VirtualHostImpl.class);
        when(virtualHost.getSecurityManager()).thenReturn(mock(SecurityManager.class));
        when(virtualHost.getEventLogger()).thenReturn(new EventLogger());
        ConfiguredObjectFactory factory = new ConfiguredObjectFactoryImpl(BrokerModel.getInstance());
        when(virtualHost.getObjectFactory()).thenReturn(factory);
        when(virtualHost.getModel()).thenReturn(factory.getModel());
        when(virtualHost.getTaskExecutor()).thenReturn(CurrentThreadTaskExecutor.newStartedInstance());
        PriorityQueueImpl queue = new PriorityQueueImpl(queueAttributes, virtualHost);
        queue.open();
        _list = queue.getEntries();
View Full Code Here

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

        SecurityManager securityManager = mock(SecurityManager.class);
        when(_virtualHost.getSecurityManager()).thenReturn(securityManager);
        when(_virtualHost.getEventLogger()).thenReturn(new EventLogger());
        when(_virtualHost.getCategoryClass()).thenReturn(VirtualHost.class);
        when(_virtualHost.getTaskExecutor()).thenReturn(_taskExecutor);
        _factory = new ConfiguredObjectFactoryImpl(BrokerModel.getInstance());
        when(_virtualHost.getObjectFactory()).thenReturn(_factory);
        when(_virtualHost.getModel()).thenReturn(_factory.getModel());
        Map<String,Object> attributes = new HashMap<String, Object>();
        attributes.put(Exchange.ID, UUID.randomUUID());
        attributes.put(Exchange.NAME, "test");
View Full Code Here

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

        queueAttributes.put(Queue.ID, UUID.randomUUID());
        queueAttributes.put(Queue.NAME, getName());
        final VirtualHostImpl virtualHost = mock(VirtualHostImpl.class);
        when(virtualHost.getSecurityManager()).thenReturn(mock(SecurityManager.class));
        when(virtualHost.getEventLogger()).thenReturn(new EventLogger());
        _factory = new ConfiguredObjectFactoryImpl(BrokerModel.getInstance());
        when(virtualHost.getObjectFactory()).thenReturn(_factory);
        when(virtualHost.getModel()).thenReturn(_factory.getModel());
        when(virtualHost.getTaskExecutor()).thenReturn(CurrentThreadTaskExecutor.newStartedInstance());
        _testQueue = new StandardQueueImpl(queueAttributes, virtualHost);
        _testQueue.open();
View Full Code Here

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

    {
        UUID id = UUID.randomUUID();
        Map<String, Object> attributes = getTrustStoreAttributes(id);
        Map<String, Object> attributesCopy = new HashMap<String, Object>(attributes);

        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();
View Full Code Here

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

    public void testCreateWithMissedRequiredAttributes()
    {
        UUID id = UUID.randomUUID();
        Map<String, Object> attributes = getTrustStoreAttributes(id);

        ConfiguredObjectFactoryImpl factory = new ConfiguredObjectFactoryImpl(BrokerModel.getInstance());
        Broker broker = mock(Broker.class);
        when(broker.getObjectFactory()).thenReturn(factory);
        when(broker.getModel()).thenReturn(factory.getModel());
        when(broker.getTaskExecutor()).thenReturn(CurrentThreadTaskExecutor.newStartedInstance());
        String[] mandatoryProperties = {TrustStore.NAME, FileTrustStore.PATH, FileTrustStore.PASSWORD};
        for (int i = 0; i < mandatoryProperties.length; i++)
        {
            Map<String, Object> properties =  new HashMap<String, Object>(attributes);
View Full Code Here

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

    private ConfiguredObjectFactory _factory;

    public void setUp() throws Exception
    {
        super.setUp();
        _factory = new ConfiguredObjectFactoryImpl(BrokerModel.getInstance());
    }
View Full Code Here

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

        super.setUp();

        EventLogger eventLogger = mock(EventLogger.class);
        SecurityManager securityManager = mock(SecurityManager.class);
        when(securityManager.authoriseConfiguringBroker(anyString(),any(Class.class),any(Operation.class))).thenReturn(true);
        ConfiguredObjectFactory objectFactory = new ConfiguredObjectFactoryImpl(BrokerModel.getInstance());

        _taskExecutor = new CurrentThreadTaskExecutor();
        _taskExecutor.start();

        SystemConfig<?> context = mock(SystemConfig.class);
        when(context.getEventLogger()).thenReturn(eventLogger);

        Broker broker = mock(Broker.class);
        when(broker.getObjectFactory()).thenReturn(objectFactory);
        when(broker.getCategoryClass()).thenReturn(Broker.class);
        when(broker.getParent(SystemConfig.class)).thenReturn(context);
        when(broker.getSecurityManager()).thenReturn(securityManager);
        when(broker.getModel()).thenReturn(objectFactory.getModel());
        when(broker.getTaskExecutor()).thenReturn(_taskExecutor);

        _virtualHostNode = mock(VirtualHostNode.class);
        when(_virtualHostNode.getParent(Broker.class)).thenReturn(broker);
        when(_virtualHostNode.getConfigurationStore()).thenReturn(mock(DurableConfigurationStore.class));
        when(_virtualHostNode.getObjectFactory()).thenReturn(objectFactory);
        when(_virtualHostNode.getModel()).thenReturn(objectFactory.getModel());
        when(_virtualHostNode.getTaskExecutor()).thenReturn(_taskExecutor);
        when(((VirtualHostNode)_virtualHostNode).getCategoryClass()).thenReturn(VirtualHostNode.class);
        _virtualHost = createHost();
    }
View Full Code Here

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

        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);
        when(broker.getCategoryClass()).thenReturn(Broker.class);
        when(broker.getParent(eq(SystemConfig.class))).thenReturn(systemConfig);
        when(broker.getTaskExecutor()).thenReturn(executor);

        _virtualHostNode = mock(VirtualHostNode.class);
        when(_virtualHostNode.getParent(Broker.class)).thenReturn(broker);
        when(_virtualHostNode.getObjectFactory()).thenReturn(objectFactory);
        when(_virtualHostNode.getConfigurationStore()).thenReturn(mock(DurableConfigurationStore.class));
        when(_virtualHostNode.getModel()).thenReturn(objectFactory.getModel());
        when(_virtualHostNode.getCategoryClass()).thenReturn(VirtualHostNode.class);
        when(_virtualHostNode.getTaskExecutor()).thenReturn(executor);
    }
View Full Code Here

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

    {
        super.setUp();

        _broker = BrokerTestHelper.createBrokerMock();
        SystemConfig<?> systemConfig = _broker.getParent(SystemConfig.class);
        when(systemConfig.getObjectFactory()).thenReturn(new ConfiguredObjectFactoryImpl(mock(Model.class)));

        _taskExecutor = new CurrentThreadTaskExecutor();
        _taskExecutor.start();
        when(_broker.getTaskExecutor()).thenReturn(_taskExecutor);
    }
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.