public abstract class Response extends HttpOperation
HttpServletResponseDefaultOperationBuilder.NoOp| Constructor and Description |
|---|
Response() |
| Modifier and Type | Method and Description |
|---|---|
static Response |
addCookie(javax.servlet.http.Cookie cookie)
|
static Response |
addDateHeader(String name,
long value)
Create an
Operation that adds a date header to the HttpServletResponse |
static Response |
addHeader(String name,
String value)
Create an
Operation that adds a header to the HttpServletResponse |
static Response |
addIntHeader(String name,
int value)
Create an
Operation that adds an int header to the HttpServletResponse |
static Response |
setCode(int code) |
String |
toString() |
static Response |
withOutputInterceptedBy(ResponseContentInterceptor... buffers)
Add the given
ResponseContentInterceptor instances to the current ServletResponse. |
static Response |
withOutputStreamWrappedBy(ResponseStreamWrapper... wrappers) |
static Response |
write(byte... bytes) |
static Response |
write(InputStream stream) |
static Response |
write(Object value) |
perform, performHttpand, create, wrappublic static Response withOutputInterceptedBy(ResponseContentInterceptor... buffers) throws IllegalStateException
ResponseContentInterceptor instances to the current ServletResponse. This will
activate response buffering on the current ServletRequest - meaning that generated output will not be sent
to the client until the entire request has completed and all registered ResponseContentInterceptor
instances have been executed.
WARNING: This will cause the ENTIRE response to be buffered in memory, which may cause performance issues
on larger responses. Make sure you know what you are doing! If it is possible to do the necessary operations using
a ResponseStreamWrapper instead, you should probably consider doing so to avoid memory overhead.
IllegalStateException - When output has already been written to the client.public static Response withOutputStreamWrappedBy(ResponseStreamWrapper... wrappers) throws IllegalStateException
IllegalStateExceptionpublic static Response addHeader(String name, String value)
Operation that adds a header to the HttpServletResponsepublic static Response addDateHeader(String name, long value)
Operation that adds a date header to the HttpServletResponsepublic static Response addIntHeader(String name, int value)
Operation that adds an int header to the HttpServletResponsepublic static Response addCookie(javax.servlet.http.Cookie cookie)
public static Response setCode(int code)
public static Response write(byte... bytes)
public static Response write(InputStream stream)
Copyright © 2013 OCPsoft. All Rights Reserved.