File tree Expand file tree Collapse file tree 5 files changed +32
-4
lines changed
rsocket-core/src/main/java/io/rsocket Expand file tree Collapse file tree 5 files changed +32
-4
lines changed Original file line number Diff line number Diff line change 2525 * An abstract implementation of {@link RSocket}. All request handling methods emit {@link
2626 * UnsupportedOperationException} and hence must be overridden to provide a valid implementation.
2727 *
28- * <p>{@link #close()} and {@link #onClose()} returns a {@code Publisher} that never terminates.
28+ * <p>{@link #close()} returns a {@code Publisher} that immediately terminates. That same Publisher
29+ * is returned by the {@link #onClose()} method.
2930 */
3031public abstract class AbstractRSocket implements RSocket {
3132
Original file line number Diff line number Diff line change @@ -26,7 +26,8 @@ public interface Closeable {
2626 * <p><em>This method is idempotent and hence can be called as many times at any point with same
2727 * outcome.</em>
2828 *
29- * @return A {@code Publisher} that completes when this {@code RSocket} close is complete.
29+ * @return A {@code Publisher} that triggers the close when subscribed to and that completes when
30+ * this {@code RSocket} close is complete.
3031 */
3132 Mono <Void > close ();
3233
Original file line number Diff line number Diff line change 1515 */
1616package io .rsocket .frame ;
1717
18- import static io .rsocket .frame .FrameHeaderFlyweight .decodeMetadataLength ;
19-
2018import io .netty .buffer .ByteBuf ;
2119import io .netty .buffer .Unpooled ;
2220import io .rsocket .Frame ;
2321import io .rsocket .FrameType ;
22+ import org .reactivestreams .Subscriber ;
23+
2424import javax .annotation .Nullable ;
2525
2626/**
@@ -49,11 +49,21 @@ private FrameHeaderFlyweight() {}
4949 private static final int STREAM_ID_FIELD_OFFSET ;
5050 private static final int PAYLOAD_OFFSET ;
5151
52+ /** (I)gnore flag: a value of 0 indicates the protocol can't ignore this frame */
5253 public static final int FLAGS_I = 0b10_0000_0000;
54+ /** (M)etadata flag: a value of 1 indicates the frame contains metadata */
5355 public static final int FLAGS_M = 0b01_0000_0000;
5456
57+ /**
58+ * (F)ollows: More fragments follow this fragment (in case of fragmented REQUEST_x or PAYLOAD
59+ * frames)
60+ */
5561 public static final int FLAGS_F = 0b00_1000_0000;
62+ /** (C)omplete: bit to indicate stream completion ({@link Subscriber#onComplete()}) */
5663 public static final int FLAGS_C = 0b00_0100_0000;
64+ /**
65+ * (N)ext: bit to indicate payload or metadata present ({@link Subscriber#onNext(Object)})
66+ */
5767 public static final int FLAGS_N = 0b00_0010_0000;
5868
5969 static {
Original file line number Diff line number Diff line change 1919import io .rsocket .FrameType ;
2020
2121public class KeepaliveFrameFlyweight {
22+ /**
23+ * (R)espond: Set by the sender of the KEEPALIVE, to which the responder MUST reply with a
24+ * KEEPALIVE without the R flag set
25+ */
2226 public static final int FLAGS_KEEPALIVE_R = 0b00_1000_0000;
2327
2428 private KeepaliveFrameFlyweight () {}
Original file line number Diff line number Diff line change 2525public class SetupFrameFlyweight {
2626 private SetupFrameFlyweight () {}
2727
28+ /**
29+ * A flag used to indicate that the client requires connection resumption, if possible (the frame
30+ * contains a Resume Identification Token)
31+ */
2832 public static final int FLAGS_RESUME_ENABLE = 0b00_1000_0000;
33+ /** A flag used to indicate that the client will honor LEASE sent by the server */
2934 public static final int FLAGS_WILL_HONOR_LEASE = 0b00_0100_0000;
35+ /**
36+ * (obsolete) flag indicating that the server should reject the SETUP if it finds anything
37+ * in the data or metadata that it doesn't understand
38+ *
39+ * @deprecated removed between protocol version 0.2 and 1.0RC
40+ */
41+ @ Deprecated
3042 public static final int FLAGS_STRICT_INTERPRETATION = 0b00_0010_0000;
3143
3244 public static final int VALID_FLAGS =
You can’t perform that action at this time.
0 commit comments