Interface ServerResponse

All Superinterfaces:
MessageBodyFilters, MessageBodyWriters

public interface ServerResponse extends MessageBodyFilters, MessageBodyWriters
Represents HTTP Response.

Lifecycle

HTTP response is send to the client in two or more steps (chunks). First contains HTTP status code and headers. First part can be send explicitly by calling ResponseHeaders.send() method or implicitly by sending a first part of the the response content. As soon as first part is send it become immutable - status(int) method and all muting operations of ResponseHeaders will throw IllegalStateException.

Response content (body/payload) can be constructed using send(...) methods.