Class StatusOnlyResponse

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

public final class StatusOnlyResponse extends Object implements Response
Sends an empty response with a configurable HTTP status code.
  • Constructor Details

    • StatusOnlyResponse

      public StatusOnlyResponse(int status)
      Constructor.
      Parameters:
      status - the HTTP status code
  • 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