An InputStream that can access a queue of ByteBuffer payloads, along with expected InputStream blocking behavior.
| Modifier and Type | Class and Description |
|---|---|
| private static record |
| Modifier and Type | Field and Description |
|---|---|
| private final ArrayDeque | |
| private static final MessageInputStream. | |
| private boolean | |
| private MessageInputStream. | |
| private static final MessageInputStream. | |
| private static final MessageInputStream. | |
| private Throwable | |
| private final AutoLock. | |
| private static final Logger | |
| private final CoreSession | |
| private long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(Frame
the frame to consume frame, Callback the callback to complete when the frame is consumed callback)Implements org. Consumes the WebSocket frame, possibly asynchronously when this method has returned. |
| public void | close()
Overrides java. Implements java. Closes this input stream and releases any system resources associated with the stream. |
| private void | |
| public void | fail(Throwable
the cause of the failure failure)Overrides default org. Fails this |
| private MessageInputStream. | |
| private Throwable | |
| public int | read()
Implements abstract java. Reads the next byte of data from the input stream. |
| public int | read(byte[]
the buffer into which the data is read. b, int the start offset in array off, int b
at which the data is written.the maximum number of bytes to read. len)Overrides java. Reads up to |
| public int | |
| public void | |
| private void |
| buffers | back to summary |
|---|---|
| private final ArrayDeque<MessageInputStream. | |
| CLOSED | back to summary |
|---|---|
| private static final MessageInputStream. | |
| closed | back to summary |
|---|---|
| private boolean closed | |
| currentEntry | back to summary |
|---|---|
| private MessageInputStream. | |
| EOF | back to summary |
|---|---|
| private static final MessageInputStream. | |
| FAILED | back to summary |
|---|---|
| private static final MessageInputStream. | |
| failure | back to summary |
|---|---|
| private Throwable failure | |
| lock | back to summary |
|---|---|
| private final AutoLock. | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| session | back to summary |
|---|---|
| private final CoreSession session | |
| timeoutMs | back to summary |
|---|---|
| private long timeoutMs | |
| MessageInputStream | back to summary |
|---|---|
| public MessageInputStream(CoreSession session) | |
| accept | back to summary |
|---|---|
| public void accept(Frame frame, Callback callback) Implements org. Doc from org. Consumes the WebSocket frame, possibly asynchronously when this method has returned. The callback argument must be completed when the frame payload is consumed. The demand for more frames must be explicitly invoked,
or arranged to be invoked asynchronously, by the implementation
of this method, by calling | |
| close | back to summary |
|---|---|
| public void close() Overrides java. Implements java. Doc from java. Closes this input stream and releases any system resources associated with the stream.
| |
| drainInto | back to summary |
|---|---|
| private void drainInto(ArrayList<MessageInputStream. | |
| fail | back to summary |
|---|---|
| public void fail(Throwable failure) Overrides default org. Doc from org. Fails this | |
| getCurrentEntry | back to summary |
|---|---|
| private MessageInputStream. | |
| getFailure | back to summary |
|---|---|
| private Throwable getFailure() | |
| read | back to summary |
|---|---|
| public int read() throws IOException Implements abstract java. Doc from java. Reads the next byte of data from the input stream. The value byte is
returned as an
| |
| read | back to summary |
|---|---|
| public int read(byte[] b, int off, int len) throws IOException Overrides java. Doc from java. Reads up to This method blocks until input data is available, end of file is detected, or an exception is thrown. If The first byte read is stored into element In every case, elements
| |
| read | back to summary |
|---|---|
| public int read(ByteBuffer buffer) throws IOException | |
| setTimeout | back to summary |
|---|---|
| public void setTimeout(long timeoutMs) | |
| succeedCurrentEntry | back to summary |
|---|---|
| private void succeedCurrentEntry() | |
| Modifier and Type | Field and Description |
|---|---|
| private final Callback | callback
Record Component accessed by callback(). |
| private final Frame |
| Modifier and Type | Method and Description |
|---|---|
| public Callback | |
| public final boolean | equals(Object
the reference object with which to compare. o)Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public Frame | |
| public final int | |
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| callback | back to summary |
|---|---|
| private final Callback callback Record Component accessed by callback(). | |
| frame | back to summary |
|---|---|
| private final Frame frame Record Component accessed by frame(). | |
| Entry | back to summary |
|---|---|
| private Entry(Frame frame, Callback callback) | |
| callback | back to summary |
|---|---|
| public Callback callback() Record Component getter of callback. | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| frame | back to summary |
|---|---|
| public Frame frame() Record Component getter of frame. | |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of
| |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.
| |