@@ -56,189 +56,199 @@ public RouterFunction<ServerResponse> build() {
5656 }
5757
5858 @ Override
59- public RouterFunctions .Builder GET (HandlerFunction <ServerResponse > handlerFunction ) {
59+ public < T extends ServerResponse > RouterFunctions .Builder GET (HandlerFunction <T > handlerFunction ) {
6060 builder .GET (handlerFunction );
6161 return this ;
6262 }
6363
6464 @ Override
65- public RouterFunctions .Builder GET (String pattern , HandlerFunction <ServerResponse > handlerFunction ) {
65+ public < T extends ServerResponse > RouterFunctions .Builder GET (String pattern , HandlerFunction <T > handlerFunction ) {
6666 builder .GET (pattern , handlerFunction );
6767 return this ;
6868 }
6969
7070 @ Override
71- public RouterFunctions .Builder GET (RequestPredicate predicate , HandlerFunction <ServerResponse > handlerFunction ) {
71+ public <T extends ServerResponse > RouterFunctions .Builder GET (RequestPredicate predicate ,
72+ HandlerFunction <T > handlerFunction ) {
7273 builder .GET (predicate , handlerFunction );
7374 return this ;
7475 }
7576
7677 @ Override
77- public RouterFunctions .Builder GET (String pattern , RequestPredicate predicate ,
78- HandlerFunction <ServerResponse > handlerFunction ) {
78+ public < T extends ServerResponse > RouterFunctions .Builder GET (String pattern , RequestPredicate predicate ,
79+ HandlerFunction <T > handlerFunction ) {
7980 builder .GET (pattern , predicate , handlerFunction );
8081 return this ;
8182 }
8283
8384 @ Override
84- public RouterFunctions .Builder HEAD (HandlerFunction <ServerResponse > handlerFunction ) {
85+ public < T extends ServerResponse > RouterFunctions .Builder HEAD (HandlerFunction <T > handlerFunction ) {
8586 builder .HEAD (handlerFunction );
8687 return this ;
8788 }
8889
8990 @ Override
90- public RouterFunctions .Builder HEAD (String pattern , HandlerFunction <ServerResponse > handlerFunction ) {
91+ public < T extends ServerResponse > RouterFunctions .Builder HEAD (String pattern , HandlerFunction <T > handlerFunction ) {
9192 builder .HEAD (pattern , handlerFunction );
9293 return this ;
9394 }
9495
9596 @ Override
96- public RouterFunctions .Builder HEAD (RequestPredicate predicate , HandlerFunction <ServerResponse > handlerFunction ) {
97+ public <T extends ServerResponse > RouterFunctions .Builder HEAD (RequestPredicate predicate ,
98+ HandlerFunction <T > handlerFunction ) {
9799 builder .HEAD (predicate , handlerFunction );
98100 return this ;
99101 }
100102
101103 @ Override
102- public RouterFunctions .Builder HEAD (String pattern , RequestPredicate predicate ,
103- HandlerFunction <ServerResponse > handlerFunction ) {
104+ public < T extends ServerResponse > RouterFunctions .Builder HEAD (String pattern , RequestPredicate predicate ,
105+ HandlerFunction <T > handlerFunction ) {
104106 builder .HEAD (pattern , predicate , handlerFunction );
105107 return this ;
106108 }
107109
108110 @ Override
109- public RouterFunctions .Builder POST (HandlerFunction <ServerResponse > handlerFunction ) {
111+ public < T extends ServerResponse > RouterFunctions .Builder POST (HandlerFunction <T > handlerFunction ) {
110112 builder .POST (handlerFunction );
111113 return this ;
112114 }
113115
114116 @ Override
115- public RouterFunctions .Builder POST (String pattern , HandlerFunction <ServerResponse > handlerFunction ) {
117+ public < T extends ServerResponse > RouterFunctions .Builder POST (String pattern , HandlerFunction <T > handlerFunction ) {
116118 builder .POST (pattern , handlerFunction );
117119 return this ;
118120 }
119121
120122 @ Override
121- public RouterFunctions .Builder POST (RequestPredicate predicate , HandlerFunction <ServerResponse > handlerFunction ) {
123+ public <T extends ServerResponse > RouterFunctions .Builder POST (RequestPredicate predicate ,
124+ HandlerFunction <T > handlerFunction ) {
122125 builder .POST (predicate , handlerFunction );
123126 return this ;
124127 }
125128
126129 @ Override
127- public RouterFunctions .Builder POST (String pattern , RequestPredicate predicate ,
128- HandlerFunction <ServerResponse > handlerFunction ) {
130+ public < T extends ServerResponse > RouterFunctions .Builder POST (String pattern , RequestPredicate predicate ,
131+ HandlerFunction <T > handlerFunction ) {
129132 builder .POST (pattern , predicate , handlerFunction );
130133 return this ;
131134 }
132135
133136 @ Override
134- public RouterFunctions .Builder PUT (HandlerFunction <ServerResponse > handlerFunction ) {
137+ public < T extends ServerResponse > RouterFunctions .Builder PUT (HandlerFunction <T > handlerFunction ) {
135138 builder .PUT (handlerFunction );
136139 return this ;
137140 }
138141
139142 @ Override
140- public RouterFunctions .Builder PUT (String pattern , HandlerFunction <ServerResponse > handlerFunction ) {
143+ public < T extends ServerResponse > RouterFunctions .Builder PUT (String pattern , HandlerFunction <T > handlerFunction ) {
141144 builder .PUT (pattern , handlerFunction );
142145 return this ;
143146 }
144147
145148 @ Override
146- public RouterFunctions .Builder PUT (RequestPredicate predicate , HandlerFunction <ServerResponse > handlerFunction ) {
149+ public <T extends ServerResponse > RouterFunctions .Builder PUT (RequestPredicate predicate ,
150+ HandlerFunction <T > handlerFunction ) {
147151 builder .PUT (predicate , handlerFunction );
148152 return this ;
149153 }
150154
151155 @ Override
152- public RouterFunctions .Builder PUT (String pattern , RequestPredicate predicate ,
153- HandlerFunction <ServerResponse > handlerFunction ) {
156+ public < T extends ServerResponse > RouterFunctions .Builder PUT (String pattern , RequestPredicate predicate ,
157+ HandlerFunction <T > handlerFunction ) {
154158 builder .PUT (pattern , predicate , handlerFunction );
155159 return this ;
156160 }
157161
158162 @ Override
159- public RouterFunctions .Builder PATCH (HandlerFunction <ServerResponse > handlerFunction ) {
163+ public < T extends ServerResponse > RouterFunctions .Builder PATCH (HandlerFunction <T > handlerFunction ) {
160164 builder .PATCH (handlerFunction );
161165 return this ;
162166 }
163167
164168 @ Override
165- public RouterFunctions .Builder PATCH (String pattern , HandlerFunction <ServerResponse > handlerFunction ) {
169+ public <T extends ServerResponse > RouterFunctions .Builder PATCH (String pattern ,
170+ HandlerFunction <T > handlerFunction ) {
166171 builder .PATCH (pattern , handlerFunction );
167172 return this ;
168173 }
169174
170175 @ Override
171- public RouterFunctions .Builder PATCH (RequestPredicate predicate , HandlerFunction <ServerResponse > handlerFunction ) {
176+ public <T extends ServerResponse > RouterFunctions .Builder PATCH (RequestPredicate predicate ,
177+ HandlerFunction <T > handlerFunction ) {
172178 builder .PATCH (predicate , handlerFunction );
173179 return this ;
174180 }
175181
176182 @ Override
177- public RouterFunctions .Builder PATCH (String pattern , RequestPredicate predicate ,
178- HandlerFunction <ServerResponse > handlerFunction ) {
183+ public < T extends ServerResponse > RouterFunctions .Builder PATCH (String pattern , RequestPredicate predicate ,
184+ HandlerFunction <T > handlerFunction ) {
179185 builder .PATCH (pattern , predicate , handlerFunction );
180186 return this ;
181187 }
182188
183189 @ Override
184- public RouterFunctions .Builder DELETE (HandlerFunction <ServerResponse > handlerFunction ) {
190+ public < T extends ServerResponse > RouterFunctions .Builder DELETE (HandlerFunction <T > handlerFunction ) {
185191 builder .DELETE (handlerFunction );
186192 return this ;
187193 }
188194
189195 @ Override
190- public RouterFunctions .Builder DELETE (String pattern , HandlerFunction <ServerResponse > handlerFunction ) {
196+ public <T extends ServerResponse > RouterFunctions .Builder DELETE (String pattern ,
197+ HandlerFunction <T > handlerFunction ) {
191198 builder .DELETE (pattern , handlerFunction );
192199 return this ;
193200 }
194201
195202 @ Override
196- public RouterFunctions .Builder DELETE (RequestPredicate predicate , HandlerFunction <ServerResponse > handlerFunction ) {
203+ public <T extends ServerResponse > RouterFunctions .Builder DELETE (RequestPredicate predicate ,
204+ HandlerFunction <T > handlerFunction ) {
197205 builder .DELETE (predicate , handlerFunction );
198206 return this ;
199207 }
200208
201209 @ Override
202- public RouterFunctions .Builder DELETE (String pattern , RequestPredicate predicate ,
203- HandlerFunction <ServerResponse > handlerFunction ) {
210+ public < T extends ServerResponse > RouterFunctions .Builder DELETE (String pattern , RequestPredicate predicate ,
211+ HandlerFunction <T > handlerFunction ) {
204212 builder .DELETE (pattern , predicate , handlerFunction );
205213 return this ;
206214 }
207215
208216 @ Override
209- public RouterFunctions .Builder OPTIONS (HandlerFunction <ServerResponse > handlerFunction ) {
217+ public < T extends ServerResponse > RouterFunctions .Builder OPTIONS (HandlerFunction <T > handlerFunction ) {
210218 builder .OPTIONS (handlerFunction );
211219 return this ;
212220 }
213221
214222 @ Override
215- public RouterFunctions .Builder OPTIONS (String pattern , HandlerFunction <ServerResponse > handlerFunction ) {
223+ public <T extends ServerResponse > RouterFunctions .Builder OPTIONS (String pattern ,
224+ HandlerFunction <T > handlerFunction ) {
216225 builder .OPTIONS (pattern , handlerFunction );
217226 return this ;
218227 }
219228
220229 @ Override
221- public RouterFunctions .Builder OPTIONS (RequestPredicate predicate ,
222- HandlerFunction <ServerResponse > handlerFunction ) {
230+ public < T extends ServerResponse > RouterFunctions .Builder OPTIONS (RequestPredicate predicate ,
231+ HandlerFunction <T > handlerFunction ) {
223232 builder .OPTIONS (predicate , handlerFunction );
224233 return this ;
225234 }
226235
227236 @ Override
228- public RouterFunctions .Builder OPTIONS (String pattern , RequestPredicate predicate ,
229- HandlerFunction <ServerResponse > handlerFunction ) {
237+ public < T extends ServerResponse > RouterFunctions .Builder OPTIONS (String pattern , RequestPredicate predicate ,
238+ HandlerFunction <T > handlerFunction ) {
230239 builder .OPTIONS (pattern , predicate , handlerFunction );
231240 return this ;
232241 }
233242
234243 @ Override
235- public RouterFunctions .Builder route (RequestPredicate predicate , HandlerFunction <ServerResponse > handlerFunction ) {
244+ public <T extends ServerResponse > RouterFunctions .Builder route (RequestPredicate predicate ,
245+ HandlerFunction <T > handlerFunction ) {
236246 builder .route (predicate , handlerFunction );
237247 return this ;
238248 }
239249
240250 @ Override
241- public RouterFunctions .Builder add (RouterFunction <ServerResponse > routerFunction ) {
251+ public < T extends ServerResponse > RouterFunctions .Builder add (RouterFunction <T > routerFunction ) {
242252 builder .add (routerFunction );
243253 return this ;
244254 }
@@ -281,8 +291,8 @@ public RouterFunctions.Builder resources(Function<ServerRequest, Optional<Resour
281291 }
282292
283293 @ Override
284- public RouterFunctions .Builder nest (RequestPredicate predicate ,
285- Supplier <RouterFunction <ServerResponse >> routerFunctionSupplier ) {
294+ public < T extends ServerResponse > RouterFunctions .Builder nest (RequestPredicate predicate ,
295+ Supplier <RouterFunction <T >> routerFunctionSupplier ) {
286296 builder .nest (predicate , routerFunctionSupplier );
287297 return this ;
288298 }
@@ -294,8 +304,8 @@ public RouterFunctions.Builder nest(RequestPredicate predicate, Consumer<RouterF
294304 }
295305
296306 @ Override
297- public RouterFunctions .Builder path (String pattern ,
298- Supplier <RouterFunction <ServerResponse >> routerFunctionSupplier ) {
307+ public < T extends ServerResponse > RouterFunctions .Builder path (String pattern ,
308+ Supplier <RouterFunction <T >> routerFunctionSupplier ) {
299309 builder .path (pattern , routerFunctionSupplier );
300310 return this ;
301311 }
@@ -307,7 +317,8 @@ public RouterFunctions.Builder path(String pattern, Consumer<RouterFunctions.Bui
307317 }
308318
309319 @ Override
310- public RouterFunctions .Builder filter (HandlerFilterFunction <ServerResponse , ServerResponse > filterFunction ) {
320+ public <T extends ServerResponse , R extends ServerResponse > RouterFunctions .Builder filter (
321+ HandlerFilterFunction <T , R > filterFunction ) {
311322 builder .filter (filterFunction );
312323 return this ;
313324 }
@@ -319,21 +330,22 @@ public RouterFunctions.Builder before(Function<ServerRequest, ServerRequest> req
319330 }
320331
321332 @ Override
322- public RouterFunctions .Builder after (BiFunction <ServerRequest , ServerResponse , ServerResponse > responseProcessor ) {
333+ public <T extends ServerResponse , R extends ServerResponse > RouterFunctions .Builder after (
334+ BiFunction <ServerRequest , T , R > responseProcessor ) {
323335 builder .after (responseProcessor );
324336 return this ;
325337 }
326338
327339 @ Override
328- public RouterFunctions .Builder onError (Predicate <Throwable > predicate ,
329- BiFunction <Throwable , ServerRequest , ServerResponse > responseProvider ) {
340+ public < T extends ServerResponse > RouterFunctions .Builder onError (Predicate <Throwable > predicate ,
341+ BiFunction <Throwable , ServerRequest , T > responseProvider ) {
330342 builder .onError (predicate , responseProvider );
331343 return this ;
332344 }
333345
334346 @ Override
335- public RouterFunctions .Builder onError (Class <? extends Throwable > exceptionType ,
336- BiFunction <Throwable , ServerRequest , ServerResponse > responseProvider ) {
347+ public < T extends ServerResponse > RouterFunctions .Builder onError (Class <? extends Throwable > exceptionType ,
348+ BiFunction <Throwable , ServerRequest , T > responseProvider ) {
337349 builder .onError (exceptionType , responseProvider );
338350 return this ;
339351 }
0 commit comments