52 import jdk.internal.net.http.hpack.DecodingCallback;
53
54 /**
55 * Http/2 Stream handling.
56 *
57 * REQUESTS
58 *
59 * sendHeadersOnly() -- assembles HEADERS frame and puts on connection outbound Q
60 *
61 * sendRequest() -- sendHeadersOnly() + sendBody()
62 *
63 * sendBodyAsync() -- calls sendBody() in an executor thread.
64 *
65 * sendHeadersAsync() -- calls sendHeadersOnly() which does not block
66 *
67 * sendRequestAsync() -- calls sendRequest() in an executor thread
68 *
69 * RESPONSES
70 *
71 * Multiple responses can be received per request. Responses are queued up on
72 * a LinkedList of CF<HttpResponse> and the the first one on the list is completed
73 * with the next response
74 *
75 * getResponseAsync() -- queries list of response CFs and returns first one
76 * if one exists. Otherwise, creates one and adds it to list
77 * and returns it. Completion is achieved through the
78 * incoming() upcall from connection reader thread.
79 *
80 * getResponse() -- calls getResponseAsync() and waits for CF to complete
81 *
82 * responseBodyAsync() -- calls responseBody() in an executor thread.
83 *
84 * incoming() -- entry point called from connection reader thread. Frames are
85 * either handled immediately without blocking or for data frames
86 * placed on the stream's inputQ which is consumed by the stream's
87 * reader thread.
88 *
89 * PushedStream sub class
90 * ======================
91 * Sending side methods are not used because the request comes from a PUSH_PROMISE
92 * frame sent by the server. When a PUSH_PROMISE is received the PushedStream
|
52 import jdk.internal.net.http.hpack.DecodingCallback;
53
54 /**
55 * Http/2 Stream handling.
56 *
57 * REQUESTS
58 *
59 * sendHeadersOnly() -- assembles HEADERS frame and puts on connection outbound Q
60 *
61 * sendRequest() -- sendHeadersOnly() + sendBody()
62 *
63 * sendBodyAsync() -- calls sendBody() in an executor thread.
64 *
65 * sendHeadersAsync() -- calls sendHeadersOnly() which does not block
66 *
67 * sendRequestAsync() -- calls sendRequest() in an executor thread
68 *
69 * RESPONSES
70 *
71 * Multiple responses can be received per request. Responses are queued up on
72 * a LinkedList of CF<HttpResponse> and the first one on the list is completed
73 * with the next response
74 *
75 * getResponseAsync() -- queries list of response CFs and returns first one
76 * if one exists. Otherwise, creates one and adds it to list
77 * and returns it. Completion is achieved through the
78 * incoming() upcall from connection reader thread.
79 *
80 * getResponse() -- calls getResponseAsync() and waits for CF to complete
81 *
82 * responseBodyAsync() -- calls responseBody() in an executor thread.
83 *
84 * incoming() -- entry point called from connection reader thread. Frames are
85 * either handled immediately without blocking or for data frames
86 * placed on the stream's inputQ which is consumed by the stream's
87 * reader thread.
88 *
89 * PushedStream sub class
90 * ======================
91 * Sending side methods are not used because the request comes from a PUSH_PROMISE
92 * frame sent by the server. When a PUSH_PROMISE is received the PushedStream
|