java.lang.Object
io.github.grumpystuff.grumpyrest.response.standard.NopResponse
All Implemented Interfaces:
Response

public final class NopResponse extends Object implements Response
Does not respond at all. This is meant to handle cases where the handler has already sent a response manually. If it didn't, then the default behavior from the servlet container will take place.
  • Field Details

    • INSTANCE

      public static final NopResponse INSTANCE
      A shared instance of this class that can be used to reduce memory usage.
  • Constructor Details

    • NopResponse

      public NopResponse()
      Constructor.
  • Method Details

    • transmit

      public void transmit(ResponseTransmitter responseTransmitter)
      Description copied from interface: Response
      Transmits this response using the specified response transmitter.

      Note: This method only takes the response transmitter. If the implementation has to access other things from the RequestCycle to transmit itself, e.g. access request parameters on-the-fly, then these things have to be passed to the implementation by another mechanism. This interface tries to keep the dependency between the two minimal.

      Specified by:
      transmit in interface Response
      Parameters:
      responseTransmitter - the response transmitter that is used to actually send data to the client