Skip to content

Commit

Permalink
Fix input / output confusion
Browse files Browse the repository at this point in the history
  • Loading branch information
trickl committed Dec 16, 2019
1 parent 65081bc commit 42a58e2
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@
import reactor.core.publisher.FluxSink;

@RequiredArgsConstructor
public class StompFluxClient<I, O> {
public class StompFluxClient<O, I> {
private final WebSocketClient webSocketClient;
private final URI transportUri;
private final Supplier<HttpHeaders> webSocketHeadersProvider;
private final ObjectMapper objectMapper;
private final Class<I> requestMessageType;
private final Class<O> responseMessageType;

private final Class<O> requestMessageType;
private final Class<I> responseMessageType;

/**
* Connect to a stomp service.
Expand All @@ -36,9 +37,9 @@ public class StompFluxClient<I, O> {
public Flux<StompFrame> get(Publisher<StompFrame> send) {
StompInputTransformer<I> stompInputTransformer =
new StompInputTransformer<>(
objectMapper, requestMessageType);
objectMapper, responseMessageType);
StompOutputTransformer<O> stompOutputTransformer =
new StompOutputTransformer<>(objectMapper, responseMessageType);
new StompOutputTransformer<>(objectMapper, requestMessageType);

EmitterProcessor<StompFrame> frameProcessor = EmitterProcessor.create();
FluxSink<StompFrame> frameSink = frameProcessor.sink();
Expand Down

0 comments on commit 42a58e2

Please sign in to comment.