Class NonBlockingWebResponse

java.lang.Object
services.moleculer.web.servlet.response.AbstractWebResponse
services.moleculer.web.servlet.response.NonBlockingWebResponse
All Implemented Interfaces:
WebResponse

public class NonBlockingWebResponse extends AbstractWebResponse
  • Field Details

  • Constructor Details

    • NonBlockingWebResponse

      public NonBlockingWebResponse(jakarta.servlet.AsyncContext async) throws IOException
      Throws:
      IOException
  • Method Details

    • send

      public void send(byte[] bytes) throws IOException
      Writes b.length bytes of body from the specified byte array to the output stream.
      Specified by:
      send in interface WebResponse
      Overrides:
      send in class AbstractWebResponse
      Parameters:
      bytes - the data
      Throws:
      IOException - if an I/O error occurs
    • end

      public boolean end()
      Completes the synchronous operation that was started on the request.
      Specified by:
      end in interface WebResponse
      Overrides:
      end in class AbstractWebResponse
      Returns:
      return true, if any resources are released
    • addToQueueAndSend

      protected void addToQueueAndSend(byte[] bytes)