rewrite-api-servlet 1.0.0.Final

org.ocpsoft.rewrite.servlet.http.event
Interface HttpInboundServletRewrite

All Superinterfaces:
HttpServletRewrite, InboundRewrite, InboundServletRewrite<javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse>, Rewrite, ServletRewrite<javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse>

public interface HttpInboundServletRewrite
extends InboundServletRewrite<javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse>, HttpServletRewrite

Rewrite event for an HttpServletRequest, HttpServletResponse lifecycle.

Author:
Lincoln Baxter, III

Method Summary
 void redirectPermanent(java.lang.String location)
          If the HttpServletResponse is not already committed, issue a Permanent Redirect (301) and call ServletRewrite.abort().
 void redirectTemporary(java.lang.String location)
          If the HttpServletResponse is not already committed, issue a Temporary Redirect (302) and call ServletRewrite.abort().
 void sendErrorCode(int code)
          If the HttpServletResponse is not already committed, send an HTTP status code and and call ServletRewrite.abort().
 void sendErrorCode(int code, java.lang.String message)
          If the HttpServletResponse is not already committed, send an HTTP status code and and call ServletRewrite.abort().
 void sendStatusCode(int code)
          If the HttpServletResponse is not already committed, send an HTTP status code, flush the OutputStream buffer, and and call ServletRewrite.abort().
 void sendStatusCode(int code, java.lang.String message)
          If the HttpServletResponse is not already committed, send an HTTP status code, flush the OutputStream buffer, and and call ServletRewrite.abort().
 
Methods inherited from interface org.ocpsoft.rewrite.servlet.event.InboundServletRewrite
forward, getDispatchResource, include, setRequest, setResponse
 
Methods inherited from interface org.ocpsoft.rewrite.servlet.http.event.HttpServletRewrite
getContextPath, getRequestPath, getRequestQueryString, getRequestQueryStringSeparator, getURL
 
Methods inherited from interface org.ocpsoft.rewrite.servlet.event.ServletRewrite
abort, getFlow, getRequest, getResponse, handled, proceed, setFlow
 
Methods inherited from interface org.ocpsoft.rewrite.event.Rewrite
getRewriteContext
 

Method Detail

redirectTemporary

void redirectTemporary(java.lang.String location)
If the HttpServletResponse is not already committed, issue a Temporary Redirect (302) and call ServletRewrite.abort(). This location must be include HttpServletRewrite.getContextPath() if attempting to redirect within the current ServletContext

This method commits the response, after which no more information can be written and the response cannot be modified.


redirectPermanent

void redirectPermanent(java.lang.String location)
If the HttpServletResponse is not already committed, issue a Permanent Redirect (301) and call ServletRewrite.abort(). This location must be include HttpServletRewrite.getContextPath() if attempting to redirect within the current ServletContext

This method commits the response, after which no more information can be written and the response cannot be modified.


sendStatusCode

void sendStatusCode(int code)
If the HttpServletResponse is not already committed, send an HTTP status code, flush the OutputStream buffer, and and call ServletRewrite.abort().

This method commits the response, after which no more information can be written and the response cannot be modified.


sendStatusCode

void sendStatusCode(int code,
                    java.lang.String message)
If the HttpServletResponse is not already committed, send an HTTP status code, flush the OutputStream buffer, and and call ServletRewrite.abort(). Provide the given message to the browser as [text/html].

This method commits the response, after which no more information can be written and the response cannot be modified.


sendErrorCode

void sendErrorCode(int code)
If the HttpServletResponse is not already committed, send an HTTP status code and and call ServletRewrite.abort().

This method commits the response, after which no more information can be written and the response cannot be modified.


sendErrorCode

void sendErrorCode(int code,
                   java.lang.String message)
If the HttpServletResponse is not already committed, send an HTTP status code and and call ServletRewrite.abort(). Provide the given message to the browser.

This method commits the response, after which no more information can be written and the response cannot be modified.


rewrite-api-servlet 1.0.0.Final

Copyright © 2012 OCPsoft. All Rights Reserved.