Search in sources :

Example 1 with IBeanManager

use of org.eclipse.scout.rt.platform.IBeanManager in project scout.rt by eclipse.

the class JobAsyncExceptionTest method unregisterTestBeans.

@After
public void unregisterTestBeans() {
    IBeanManager manager = BEANS.getBeanManager();
    for (IBean<?> bean : m_registeredBeans) {
        manager.unregisterBean(bean);
    }
    BEANS.get(RunContextChainIntercepterRegistry.class).reindex();
}
Also used : RunContextChainIntercepterRegistry(org.eclipse.scout.rt.platform.context.RunContextChainIntercepterRegistry) IBeanManager(org.eclipse.scout.rt.platform.IBeanManager) After(org.junit.After)

Example 2 with IBeanManager

use of org.eclipse.scout.rt.platform.IBeanManager in project scout.rt by eclipse.

the class RegisterTunnelToServerPlatformListener method stateChanged.

@Override
public void stateChanged(PlatformEvent event) {
    if (event.getState() == IPlatform.State.BeanManagerPrepared) {
        if (!isEnabled()) {
            return;
        }
        // register all tunnels to server
        final IBeanManager beanManager = event.getSource().getBeanManager();
        final IClassInventory classInventory = ClassInventory.get();
        registerTunnelToServerProxies(beanManager, classInventory);
    }
}
Also used : IClassInventory(org.eclipse.scout.rt.platform.inventory.IClassInventory) IBeanManager(org.eclipse.scout.rt.platform.IBeanManager)

Example 3 with IBeanManager

use of org.eclipse.scout.rt.platform.IBeanManager in project scout.rt by eclipse.

the class NotificationDispatcherTest method after.

@After
public void after() {
    TestingUtility.unregisterBeans(m_serviceReg);
    // ensure bean hander cache of notification dispatcher gets refreshed
    IBeanManager beanManager = BEANS.getBeanManager();
    IBean<NotificationHandlerRegistry> bean = beanManager.getBean(NotificationHandlerRegistry.class);
    beanManager.unregisterBean(bean);
    beanManager.registerBean(new BeanMetaData(bean));
}
Also used : NotificationHandlerRegistry(org.eclipse.scout.rt.shared.notification.NotificationHandlerRegistry) BeanMetaData(org.eclipse.scout.rt.platform.BeanMetaData) IBeanManager(org.eclipse.scout.rt.platform.IBeanManager) After(org.junit.After)

Example 4 with IBeanManager

use of org.eclipse.scout.rt.platform.IBeanManager in project scout.rt by eclipse.

the class ClientRunContextWithInterceptorProducerTest method unregisterInterceptor.

@After
public void unregisterInterceptor() {
    IBeanManager manager = BEANS.getBeanManager();
    for (IBean<?> bean : m_registeredBeans) {
        manager.unregisterBean(bean);
    }
    BEANS.get(RunContextChainIntercepterRegistry.class).reindex();
}
Also used : RunContextChainIntercepterRegistry(org.eclipse.scout.rt.platform.context.RunContextChainIntercepterRegistry) IBeanManager(org.eclipse.scout.rt.platform.IBeanManager) After(org.junit.After)

Example 5 with IBeanManager

use of org.eclipse.scout.rt.platform.IBeanManager in project scout.rt by eclipse.

the class BinaryServiceTunnelContentHandlerTest method after.

@After
public void after() {
    TestingUtility.unregisterBean(m_serviceReg);
    IBeanManager beanManager = BEANS.getBeanManager();
    // restore
    for (IBean<?> bean : m_oldBeans) {
        beanManager.registerBean(new BeanMetaData(bean));
    }
}
Also used : BeanMetaData(org.eclipse.scout.rt.platform.BeanMetaData) IBeanManager(org.eclipse.scout.rt.platform.IBeanManager) After(org.junit.After)

Aggregations

IBeanManager (org.eclipse.scout.rt.platform.IBeanManager)11 BeanMetaData (org.eclipse.scout.rt.platform.BeanMetaData)6 After (org.junit.After)6 RunContextChainIntercepterRegistry (org.eclipse.scout.rt.platform.context.RunContextChainIntercepterRegistry)2 NotificationHandlerRegistry (org.eclipse.scout.rt.shared.notification.NotificationHandlerRegistry)2 IBean (org.eclipse.scout.rt.platform.IBean)1 IClassInventory (org.eclipse.scout.rt.platform.inventory.IClassInventory)1 Before (org.junit.Before)1