Search in sources :

Example 1 with PresentationModelBuilderFactory

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

the class AbstractDolphinBasedTest method createBeanManager.

protected BeanManager createBeanManager(final ClientModelStore clientModelStore, final BeanRepository beanRepository, final EventDispatcher dispatcher) {
    final Converters converters = new Converters(beanRepository);
    final PresentationModelBuilderFactory builderFactory = new ClientPresentationModelBuilderFactory(clientModelStore);
    final ClassRepository classRepository = new ClassRepositoryImpl(clientModelStore, converters, builderFactory);
    final ListMapper listMapper = new ListMapperImpl(clientModelStore, classRepository, beanRepository, builderFactory, dispatcher);
    final BeanBuilder beanBuilder = new ClientBeanBuilderImpl(classRepository, beanRepository, listMapper, builderFactory, dispatcher);
    return new BeanManagerImpl(beanRepository, beanBuilder);
}
Also used : BeanBuilder(com.canoo.dp.impl.remoting.BeanBuilder) ClientPresentationModelBuilderFactory(com.canoo.dp.impl.client.ClientPresentationModelBuilderFactory) PresentationModelBuilderFactory(com.canoo.dp.impl.remoting.PresentationModelBuilderFactory) ClientPresentationModelBuilderFactory(com.canoo.dp.impl.client.ClientPresentationModelBuilderFactory) BeanManagerImpl(com.canoo.dp.impl.remoting.BeanManagerImpl) ListMapper(com.canoo.dp.impl.remoting.ListMapper) ListMapperImpl(com.canoo.dp.impl.remoting.collections.ListMapperImpl) ClassRepository(com.canoo.dp.impl.remoting.ClassRepository) ClassRepositoryImpl(com.canoo.dp.impl.remoting.ClassRepositoryImpl) Converters(com.canoo.dp.impl.remoting.Converters) ClientBeanBuilderImpl(com.canoo.dp.impl.client.ClientBeanBuilderImpl)

Example 2 with PresentationModelBuilderFactory

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

the class AbstractDolphinBasedTest method createBeanManager.

protected BeanManager createBeanManager(ServerModelStore serverModelStore, BeanRepository beanRepository, EventDispatcher 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 : 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) ServerPresentationModelBuilderFactory(com.canoo.dp.impl.server.model.ServerPresentationModelBuilderFactory) PresentationModelBuilderFactory(com.canoo.dp.impl.remoting.PresentationModelBuilderFactory) 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)

Example 3 with PresentationModelBuilderFactory

use of com.canoo.dp.impl.remoting.PresentationModelBuilderFactory 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)3 BeanManagerImpl (com.canoo.dp.impl.remoting.BeanManagerImpl)3 ClassRepository (com.canoo.dp.impl.remoting.ClassRepository)3 ClassRepositoryImpl (com.canoo.dp.impl.remoting.ClassRepositoryImpl)3 Converters (com.canoo.dp.impl.remoting.Converters)3 ListMapper (com.canoo.dp.impl.remoting.ListMapper)3 PresentationModelBuilderFactory (com.canoo.dp.impl.remoting.PresentationModelBuilderFactory)3 ListMapperImpl (com.canoo.dp.impl.remoting.collections.ListMapperImpl)3 RemotingConfiguration (com.canoo.dp.impl.server.config.RemotingConfiguration)2 GarbageCollectionCallback (com.canoo.dp.impl.server.gc.GarbageCollectionCallback)2 GarbageCollector (com.canoo.dp.impl.server.gc.GarbageCollector)2 Instance (com.canoo.dp.impl.server.gc.Instance)2 ServerBeanBuilderImpl (com.canoo.dp.impl.server.model.ServerBeanBuilderImpl)2 ServerPresentationModelBuilderFactory (com.canoo.dp.impl.server.model.ServerPresentationModelBuilderFactory)2 ClientBeanBuilderImpl (com.canoo.dp.impl.client.ClientBeanBuilderImpl)1 ClientPresentationModelBuilderFactory (com.canoo.dp.impl.client.ClientPresentationModelBuilderFactory)1 BeanRepositoryImpl (com.canoo.dp.impl.remoting.BeanRepositoryImpl)1 EventDispatcher (com.canoo.dp.impl.remoting.EventDispatcher)1 ServerEventDispatcher (com.canoo.dp.impl.server.model.ServerEventDispatcher)1