Skip to content

Commit

Permalink
Replace Mono to Flux
Browse files Browse the repository at this point in the history
  • Loading branch information
aplotnikov committed Nov 3, 2018
1 parent 8c21719 commit b585aa4
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import lombok.experimental.FieldDefaults;
import net.jcip.annotations.NotThreadSafe;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.core.publisher.SynchronousSink;
import reactor.util.annotation.Nullable;

Expand Down Expand Up @@ -42,13 +41,13 @@ public final class XmlFileReader implements FileReader {
public Flux<AbstractEvent> read(AbstractEvent event) {
this.filePath = event.getSourcePath();
return Flux.concat(
Mono.just(new FileProcessingStarted(filePath)),
Flux.just(new FileProcessingStarted(filePath)),
Flux.generate(
reader(filePath),
this::findClients,
closeReader()
),
Mono.just(new FileProcessed(filePath))
Flux.just(new FileProcessed(filePath))
);
}

Expand Down

0 comments on commit b585aa4

Please sign in to comment.