Class QueryResultPusher


  • public abstract class QueryResultPusher
    extends Object
    • Method Detail

      • start

        public abstract QueryResultPusher.ResultsWriter start()
        Builds a ResultsWriter to start the lifecycle of the QueryResultPusher. The ResultsWriter encapsulates the logic to run the query, serialize it and also report success/failure.

        This response must not be null. The job of this ResultsWriter is largely to provide lifecycle management to the query running and reporting, so this object must never be null.

        This start() method should do as little work as possible, it should really just make the ResultsWriter and return.

        Returns:
        a new ResultsWriter
      • push

        @Nullable
        public javax.ws.rs.core.Response push()
        Pushes results out. Can sometimes return a JAXRS Response object instead of actually pushing to the output stream, primarily for error handling that occurs before switching the servlet to asynchronous mode.
        Returns:
        null if the response has already been handled and pushed out, or a non-null Response object if it expects the container to put the bytes on the wire.