use of com.canoo.platform.server.spring.ClientScope in project dolphin-platform by canoo.
the class SpringBeanFactory method createClientSession.
@Bean(name = "clientSession")
@ClientScope
protected ClientSession createClientSession() {
final ClientSessionProvider provider = PlatformBootstrap.getServerCoreComponents().getInstance(ClientSessionProvider.class);
Assert.requireNonNull(provider, "provider");
return provider.getCurrentClientSession();
}
use of com.canoo.platform.server.spring.ClientScope in project dolphin-platform by canoo.
the class RemotingSpringBeanFactory method createRemotingContext.
@Bean(name = "remotingContext")
@ClientScope
protected RemotingContext createRemotingContext(RemotingEventBus eventBus) {
Assert.requireNonNull(eventBus, "eventBus");
final DolphinContextProvider contextProvider = PlatformBootstrap.getServerCoreComponents().getInstance(DolphinContextProvider.class);
Assert.requireNonNull(contextProvider, "contextProvider");
final DolphinContext context = contextProvider.getCurrentDolphinContext();
Assert.requireNonNull(context, "context");
return new RemotingContextImpl(context, eventBus);
}
Aggregations