net.craftforge.essential.controller
Interface Response

All Known Implementing Classes:
BasicResponseImpl

public interface Response

Since:
20.02.2011
Author:
Christian Bick

Method Summary
 OutputStream getBodyOutputStream()
          Gets the output stream for streaming the response body.
 Map<String,String[]> getHeaders()
          Gets the HTTP headers of this response.
 HttpStatusCode getStatusCode()
          Gets the HTTP status code of this response.
 void sendHeaders(HttpStatusCode status, Map<String,String[]> headers)
          Sends the response headers and sets the HTTP response status.
 

Method Detail

sendHeaders

void sendHeaders(HttpStatusCode status,
                 Map<String,String[]> headers)
Sends the response headers and sets the HTTP response status. Must be called prior to getBodyStream();

Parameters:
status - The response status
headers - The response headers

getStatusCode

HttpStatusCode getStatusCode()
Gets the HTTP status code of this response.

Returns:
The HTTP status code

getHeaders

Map<String,String[]> getHeaders()
Gets the HTTP headers of this response.

Returns:
The HTTP headers

getBodyOutputStream

OutputStream getBodyOutputStream()
Gets the output stream for streaming the response body.

Returns:
The body output stream


Copyright © 2011. All Rights Reserved.