@@ -63,25 +63,6 @@ enum State {
63
63
*/
64
64
CONTINUE
65
65
}
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
-
85
66
/**
86
67
* Invoked as soon as the HTTP status line has been received
87
68
*
@@ -100,6 +81,16 @@ enum State {
100
81
*/
101
82
State onHeadersReceived (HttpHeaders headers ) throws Exception ;
102
83
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
+
103
94
/**
104
95
* Invoked when trailing headers have been received.
105
96
* @param headers the trailing HTTP headers.
@@ -109,6 +100,14 @@ enum State {
109
100
default State onTrailingHeadersReceived (HttpHeaders headers ) throws Exception {
110
101
return State .CONTINUE ;
111
102
}
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 );
112
111
113
112
/**
114
113
* Invoked once the HTTP response processing is finished.
0 commit comments