Search in sources :

Example 1 with BeanRepositoryImpl

use of com.canoo.dp.impl.remoting.BeanRepositoryImpl in project dolphin-platform by canoo.

the class AbstractDolphinBasedTest method createBeanManager.

protected BeanManager createBeanManager(ServerModelStore serverModelStore) {
    final EventDispatcher dispatcher = new ServerEventDispatcher(serverModelStore);
    final BeanRepositoryImpl beanRepository = new BeanRepositoryImpl(serverModelStore, dispatcher);
    final Converters converters = new Converters(beanRepository);
    final PresentationModelBuilderFactory builderFactory = new ServerPresentationModelBuilderFactory(serverModelStore);
    final ClassRepository classRepository = new ClassRepositoryImpl(serverModelStore, converters, builderFactory);
    final ListMapper listMapper = new ListMapperImpl(serverModelStore, classRepository, beanRepository, builderFactory, dispatcher);
    final RemotingConfiguration configurationForGc = new RemotingConfiguration();
    final GarbageCollector garbageCollector = new GarbageCollector(configurationForGc, new GarbageCollectionCallback() {

        @Override
        public void onReject(Set<Instance> instances) {
        }
    });
    final BeanBuilder beanBuilder = new ServerBeanBuilderImpl(classRepository, beanRepository, listMapper, builderFactory, dispatcher, garbageCollector);
    return new BeanManagerImpl(beanRepository, beanBuilder);
}
Also used : ServerEventDispatcher(com.canoo.dp.impl.server.model.ServerEventDispatcher) Instance(com.canoo.dp.impl.server.gc.Instance) ClassRepository(com.canoo.dp.impl.remoting.ClassRepository) Converters(com.canoo.dp.impl.remoting.Converters) BeanBuilder(com.canoo.dp.impl.remoting.BeanBuilder) BeanRepositoryImpl(com.canoo.dp.impl.remoting.BeanRepositoryImpl) ServerPresentationModelBuilderFactory(com.canoo.dp.impl.server.model.ServerPresentationModelBuilderFactory) PresentationModelBuilderFactory(com.canoo.dp.impl.remoting.PresentationModelBuilderFactory) ServerEventDispatcher(com.canoo.dp.impl.server.model.ServerEventDispatcher) EventDispatcher(com.canoo.dp.impl.remoting.EventDispatcher) RemotingConfiguration(com.canoo.dp.impl.server.config.RemotingConfiguration) ServerPresentationModelBuilderFactory(com.canoo.dp.impl.server.model.ServerPresentationModelBuilderFactory) GarbageCollectionCallback(com.canoo.dp.impl.server.gc.GarbageCollectionCallback) ServerBeanBuilderImpl(com.canoo.dp.impl.server.model.ServerBeanBuilderImpl) BeanManagerImpl(com.canoo.dp.impl.remoting.BeanManagerImpl) ListMapper(com.canoo.dp.impl.remoting.ListMapper) ListMapperImpl(com.canoo.dp.impl.remoting.collections.ListMapperImpl) ClassRepositoryImpl(com.canoo.dp.impl.remoting.ClassRepositoryImpl) GarbageCollector(com.canoo.dp.impl.server.gc.GarbageCollector)

Aggregations

BeanBuilder (com.canoo.dp.impl.remoting.BeanBuilder)1 BeanManagerImpl (com.canoo.dp.impl.remoting.BeanManagerImpl)1 BeanRepositoryImpl (com.canoo.dp.impl.remoting.BeanRepositoryImpl)1 ClassRepository (com.canoo.dp.impl.remoting.ClassRepository)1 ClassRepositoryImpl (com.canoo.dp.impl.remoting.ClassRepositoryImpl)1 Converters (com.canoo.dp.impl.remoting.Converters)1 EventDispatcher (com.canoo.dp.impl.remoting.EventDispatcher)1 ListMapper (com.canoo.dp.impl.remoting.ListMapper)1 PresentationModelBuilderFactory (com.canoo.dp.impl.remoting.PresentationModelBuilderFactory)1 ListMapperImpl (com.canoo.dp.impl.remoting.collections.ListMapperImpl)1 RemotingConfiguration (com.canoo.dp.impl.server.config.RemotingConfiguration)1 GarbageCollectionCallback (com.canoo.dp.impl.server.gc.GarbageCollectionCallback)1 GarbageCollector (com.canoo.dp.impl.server.gc.GarbageCollector)1 Instance (com.canoo.dp.impl.server.gc.Instance)1 ServerBeanBuilderImpl (com.canoo.dp.impl.server.model.ServerBeanBuilderImpl)1 ServerEventDispatcher (com.canoo.dp.impl.server.model.ServerEventDispatcher)1 ServerPresentationModelBuilderFactory (com.canoo.dp.impl.server.model.ServerPresentationModelBuilderFactory)1