rewrite-api-servlet 1.0.0.Final

org.ocpsoft.rewrite.servlet.event
Class BaseRewrite<IN extends javax.servlet.ServletRequest,OUT extends javax.servlet.ServletResponse>

java.lang.Object
  extended by org.ocpsoft.rewrite.servlet.event.BaseRewrite<IN,OUT>

public abstract class BaseRewrite<IN extends javax.servlet.ServletRequest,OUT extends javax.servlet.ServletResponse>
extends java.lang.Object

Base implementation of InboundServletRewriteEvent

Author:
Lincoln Baxter, III

Nested Class Summary
static class BaseRewrite.Flow
          Enum to represent the finite state of the Rewrite container.
 
Field Summary
protected  java.lang.String dispatchResource
           
protected  BaseRewrite.Flow flow
           
 
Constructor Summary
BaseRewrite(IN request, OUT response)
           
 
Method Summary
 void abort()
          Abort the current ServletRequest immediately.
 void forward(java.lang.String resource)
          Once Rule processing has completed, perform a RequestDispatcher.forward(ServletRequest, ServletResponse) to the given resource target.
 java.lang.String getDispatchResource()
          Get the current dispatch resource.
 BaseRewrite.Flow getFlow()
          Get the current BaseRewrite.Flow state.
 IN getRequest()
          Get the current ServletRequest object.
 OUT getResponse()
          Get the current ServletResponse object.
 Context getRewriteContext()
          Get the Context for the current Rewrite.
 void handled()
          Stop processing Rule definitions and pass control of the the current ServletRequest to the underlying application, even if a call to abort(), proceed(), forward(String), or any other life-cycle control method has previously been made.
 void include(java.lang.String resource)
          Once Rule processing has completed, perform a RequestDispatcher.include(ServletRequest, ServletResponse) of the given resource target.
 void proceed()
          Continue processing Rule definitions for the current ServletRequest, even if a call to abort(), handled(), forward(String), or any other life-cycle control method has previously been made.
 void setFlow(BaseRewrite.Flow flow)
          Set the current BaseRewrite.Flow state.
 void setRequest(IN request)
          Set the current ServletRequest object.
 void setResponse(OUT response)
          Set the current ServletResponse object.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

flow

protected BaseRewrite.Flow flow

dispatchResource

protected java.lang.String dispatchResource
Constructor Detail

BaseRewrite

public BaseRewrite(IN request,
                   OUT response)
Method Detail

abort

public void abort()
Abort the current ServletRequest immediately. No further action will be taken on, and the request will not be passed to the application.


proceed

public void proceed()
Continue processing Rule definitions for the current ServletRequest, even if a call to abort(), handled(), forward(String), or any other life-cycle control method has previously been made.


handled

public void handled()
Stop processing Rule definitions and pass control of the the current ServletRequest to the underlying application, even if a call to abort(), proceed(), forward(String), or any other life-cycle control method has previously been made.


include

public void include(java.lang.String resource)
Once Rule processing has completed, perform a RequestDispatcher.include(ServletRequest, ServletResponse) of the given resource target.


forward

public void forward(java.lang.String resource)
Once Rule processing has completed, perform a RequestDispatcher.forward(ServletRequest, ServletResponse) to the given resource target.


getFlow

public BaseRewrite.Flow getFlow()
Get the current BaseRewrite.Flow state.


setFlow

public void setFlow(BaseRewrite.Flow flow)
Set the current BaseRewrite.Flow state.


getDispatchResource

public java.lang.String getDispatchResource()
Get the current dispatch resource. This value is used when performing a forward(String), include(String), or redirect.


getRequest

public IN getRequest()
Get the current ServletRequest object.


getResponse

public OUT getResponse()
Get the current ServletResponse object.


setRequest

public void setRequest(IN request)
Set the current ServletRequest object.


setResponse

public void setResponse(OUT response)
Set the current ServletResponse object.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getRewriteContext

public Context getRewriteContext()
Get the Context for the current Rewrite.


rewrite-api-servlet 1.0.0.Final

Copyright © 2012 OCPsoft. All Rights Reserved.