You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/08/11 18:32:22 UTC

[GitHub] [ignite] nizhikov commented on a change in pull request #9107: IGNITE-14708: Add an ability to track request handling completion in …

nizhikov commented on a change in pull request #9107:
URL: https://github.com/apache/ignite/pull/9107#discussion_r687077504



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
##########
@@ -145,6 +148,10 @@
     /** */
     private final Thread sesTimeoutCheckerThread;
 
+    /** Request / response listeners. */
+    private final List<BiConsumer<GridRestRequest, IgniteInternalFuture<GridRestResponse>>> lsnrs =

Review comment:
       All we need is made `handleAsync0` protected and extend `GridRestProcessor` in the plugin like this:
   
   ```
       /** */
       private static class MyGridRestProcessor extends GridRestProcessor {
           /** @param ctx Context. */
           public MyGridRestProcessor(GridKernalContext ctx) {
               super(ctx);
           }
   
           /** {@inheritDoc} */
           @Override protected IgniteInternalFuture<GridRestResponse> handleAsync0(GridRestRequest req) {
               IgniteInternalFuture<GridRestResponse> fut = super.handleAsync0(req);
   
               // Do whatever you want.
   
               return fut;
           }
       }
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org