Sirius Web Subscription [message #1853494] |
Tue, 05 July 2022 06:14  |
Eclipse User |
|
|
|
Hello,
I'm trying to follow the instruction on the recent siriuscon.
I don't get the code in SubscriptionMapEventDataFetcher.java
This method return a Publisher<IPayload>
@Override
public Publisher<IPayload> get(DataFetchingEnvironment environment) throws Exception {
Object argument = environment.getArgument("input"); //$NON-NLS-1$
var input = this.objectMapper.convertValue(argument, MapEventInput.class);
var mapConfiguration = new MapConfiguration(input.getMapId());
return this.editingContextEventProcessorRegistry.getOrCreateEditingContextEventProcessor(input.getEditingContextId())
.flatMap(processor -> processor.acquireRepresentationEventProcessor(IMapEventProcessor.class, mapConfiguration, input))
.map(representationEventProcessor -> representationEventProcessor.getOutputEvents(input)).orElse(Flux.empty());
}
but inside this method we return a call to getOutputEvents that returns a Flux<IPayload>
@Override
public Flux<IPayload> getOutputEvents(IInput input) {
return Flux.merge(this.mapEventFlux.getFlux(input), this.subscriptionManager.getFlux(input));
}
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03822 seconds