|
rewrite-config-servlet 2.0.0.Alpha2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ocpsoft.rewrite.config.DefaultOperationBuilder
org.ocpsoft.rewrite.servlet.config.HttpOperation
org.ocpsoft.rewrite.servlet.config.Response
public abstract class Response
Responsible for adding various properties such as headers and cookies to the HttpServletResponse
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.ocpsoft.rewrite.config.DefaultOperationBuilder |
|---|
DefaultOperationBuilder.NoOp |
| Constructor Summary | |
|---|---|
Response()
|
|
| Method Summary | |
|---|---|
static Response |
addCookie(javax.servlet.http.Cookie cookie)
Create an Operation that adds a Cookie to the
HttpServletResponse |
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)
|
| Methods inherited from class org.ocpsoft.rewrite.servlet.config.HttpOperation |
|---|
perform, performHttp |
| Methods inherited from class org.ocpsoft.rewrite.config.DefaultOperationBuilder |
|---|
and, create, wrap |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Response()
| Method Detail |
|---|
public 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
IllegalStateException
public static Response addHeader(String name,
String value)
Operation that adds a header to the HttpServletResponse
public static Response addDateHeader(String name,
long value)
Operation that adds a date header to the HttpServletResponse
public static Response addIntHeader(String name,
int value)
Operation that adds an int header to the HttpServletResponse
public static Response addCookie(javax.servlet.http.Cookie cookie)
Operation that adds a Cookie to the
HttpServletResponse
public static Response setCode(int code)
public String toString()
toString in class Object
|
rewrite-config-servlet 2.0.0.Alpha2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||