use of com.canoo.dp.impl.server.context.RemotingContextImpl in project dolphin-platform by canoo.
the class RemotingCdiBeanFactory method createRemotingContext.
@Produces
@ClientScoped
public 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);
}
use of com.canoo.dp.impl.server.context.RemotingContextImpl 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