Skip to content

Commit adb7ce5

Browse files
committed
Refactor RequestHandler.handleChannel to only take a Publisher<Payload> as argument.
The `initialPayload` was already part of the `payloads` publisher, this was very confusing. + Fix the tests impacted by the new API. + Code style: Ensure lines length < 100 characters
1 parent 468dadf commit adb7ce5

File tree

13 files changed

+1852
-1511
lines changed

13 files changed

+1852
-1511
lines changed

src/main/java/io/reactivesocket/DuplexConnection.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,11 @@ public interface DuplexConnection extends Closeable {
3131
Observable<Frame> getInput();
3232

3333
void addOutput(Publisher<Frame> o, Completable callback);
34-
34+
35+
default void addOutput(Frame frame, Completable callback) {
36+
addOutput(s -> {
37+
s.onNext(frame);
38+
s.onComplete();
39+
}, callback);
40+
}
3541
}

0 commit comments

Comments
 (0)