Class 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 Detail

      • SizeRequestTransformer

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

      • 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