@@ -63,25 +63,6 @@ enum State {
6363 */
6464 CONTINUE
6565 }
66-
67- /**
68- * Invoked when an unexpected exception occurs during the processing of the response. The exception may have been
69- * produced by implementation of onXXXReceived method invocation.
70- *
71- * @param t a {@link Throwable}
72- */
73- void onThrowable (Throwable t );
74-
75- /**
76- * Invoked as soon as some response body part are received. Could be invoked many times.
77- * Beware that, depending on the provider (Netty) this can be notified with empty body parts.
78- *
79- * @param bodyPart response's body part.
80- * @return a {@link State} telling to CONTINUE or ABORT the current processing. Aborting will also close the connection.
81- * @throws Exception if something wrong happens
82- */
83- State onBodyPartReceived (HttpResponseBodyPart bodyPart ) throws Exception ;
84-
8566 /**
8667 * Invoked as soon as the HTTP status line has been received
8768 *
@@ -100,6 +81,16 @@ enum State {
10081 */
10182 State onHeadersReceived (HttpHeaders headers ) throws Exception ;
10283
84+ /**
85+ * Invoked as soon as some response body part are received. Could be invoked many times.
86+ * Beware that, depending on the provider (Netty) this can be notified with empty body parts.
87+ *
88+ * @param bodyPart response's body part.
89+ * @return a {@link State} telling to CONTINUE or ABORT the current processing. Aborting will also close the connection.
90+ * @throws Exception if something wrong happens
91+ */
92+ State onBodyPartReceived (HttpResponseBodyPart bodyPart ) throws Exception ;
93+
10394 /**
10495 * Invoked when trailing headers have been received.
10596 * @param headers the trailing HTTP headers.
@@ -109,6 +100,14 @@ enum State {
109100 default State onTrailingHeadersReceived (HttpHeaders headers ) throws Exception {
110101 return State .CONTINUE ;
111102 }
103+
104+ /**
105+ * Invoked when an unexpected exception occurs during the processing of the response. The exception may have been
106+ * produced by implementation of onXXXReceived method invocation.
107+ *
108+ * @param t a {@link Throwable}
109+ */
110+ void onThrowable (Throwable t );
112111
113112 /**
114113 * Invoked once the HTTP response processing is finished.
0 commit comments