Interface SelfResponseFactory
- All Superinterfaces:
Response
- All Known Implementing Classes:
PathArgumentParseException
Implementations of this interface can be returned as a response without using a specialized factory, but instead
of implementing the
Response interface manually, they just produce another Response instance. This
simplifies re-using a standard response implementation for specific cases without registering a custom factory.-
Method Summary
Modifier and TypeMethodDescriptionCreates the response.default voidtransmit(ResponseTransmitter responseTransmitter) Transmits this response using the specified response transmitter.
-
Method Details
-
createResponse
Response createResponse()Creates the response.- Returns:
- the response
-
transmit
Description copied from interface:ResponseTransmits 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
RequestCycleto 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:
transmitin interfaceResponse- Parameters:
responseTransmitter- the response transmitter that is used to actually send data to the client- Throws:
IOException- on I/O errors
-