Class SizeRequestTransformer

java.lang.Object
org.restheart.handlers.PipelinedHandler
org.restheart.mongodb.handlers.SizeRequestTransformer
All Implemented Interfaces:
io.undertow.server.HttpHandler

public class SizeRequestTransformer extends PipelinedHandler
For count request (/_size) sets the pagesize to 0 to avoid retrieving data and sets response content to just contain the _size property
Author:
Andrea Di Cesare <andrea@softinstigate.com>
  • Constructor Details

    • SizeRequestTransformer

      public SizeRequestTransformer(boolean phase)
      Parameters:
      phase - true for request phase, false for response
  • Method Details

    • handleRequest

      public void handleRequest(io.undertow.server.HttpServerExchange exchange) throws Exception
      Specified by:
      handleRequest in interface io.undertow.server.HttpHandler
      Specified by:
      handleRequest in class PipelinedHandler
      Parameters:
      exchange -
      Throws:
      Exception