Class BaseRewrite<IN extends jakarta.servlet.ServletRequest,OUT extends jakarta.servlet.ServletResponse>
java.lang.Object
org.ocpsoft.rewrite.AbstractRewrite
org.ocpsoft.rewrite.servlet.event.BaseRewrite<IN,OUT>
- All Implemented Interfaces:
Rewrite
public abstract class BaseRewrite<IN extends jakarta.servlet.ServletRequest,OUT extends jakarta.servlet.ServletResponse>
extends AbstractRewrite
Base implementation of
InboundServletRewriteEvent- Author:
- Lincoln Baxter, III
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnum to represent the finite state of the Rewrite container. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBaseRewrite(IN request, OUT response, jakarta.servlet.ServletContext servletContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()Abort the currentServletRequestimmediately.voidOnceRuleprocessing has completed, perform aRequestDispatcher.forward(ServletRequest, ServletResponse)to the given resource target.Get the current dispatch resource.getFlow()Get the currentBaseRewrite.ServletRewriteFlowstate.Get the currentServletRequestobject.Get the currentServletResponseobject.jakarta.servlet.ServletContextGet the currentServletContextobject.voidhandled()Stop processingRuledefinitions and pass control of the the currentServletRequestto the underlying application, even if a call toabort(),proceed(),forward(String), or any other life-cycle control method has previously been made.voidOnceRuleprocessing has completed, perform aRequestDispatcher.include(ServletRequest, ServletResponse)of the given resource target.voidproceed()Continue processingRuledefinitions for the currentServletRequest, even if a call toabort(),handled(),forward(String), or any other life-cycle control method has previously been made.voidSet the currentBaseRewrite.ServletRewriteFlowstate.voidsetRequest(IN request) Set the currentServletRequestobject.voidsetResponse(OUT response) Set the currentServletResponseobject.toString()Methods inherited from class org.ocpsoft.rewrite.AbstractRewrite
getEvaluatedRules, logEvaluatedRules
-
Field Details
-
flow
-
dispatchResource
-
-
Constructor Details
-
BaseRewrite
-
-
Method Details
-
abort
public void abort()Abort the currentServletRequestimmediately. No further action will be taken on, and the request will not be passed to the application. -
proceed
public void proceed()Continue processingRuledefinitions for the currentServletRequest, even if a call toabort(),handled(),forward(String), or any other life-cycle control method has previously been made. -
handled
public void handled()Stop processingRuledefinitions and pass control of the the currentServletRequestto the underlying application, even if a call toabort(),proceed(),forward(String), or any other life-cycle control method has previously been made. -
include
OnceRuleprocessing has completed, perform aRequestDispatcher.include(ServletRequest, ServletResponse)of the given resource target. -
forward
OnceRuleprocessing has completed, perform aRequestDispatcher.forward(ServletRequest, ServletResponse)to the given resource target. -
getFlow
Get the currentBaseRewrite.ServletRewriteFlowstate. -
setFlow
Set the currentBaseRewrite.ServletRewriteFlowstate. -
getDispatchResource
Get the current dispatch resource. This value is used when performing aforward(String),include(String), or redirect. -
getServletContext
public jakarta.servlet.ServletContext getServletContext()Get the currentServletContextobject. -
getRequest
Get the currentServletRequestobject. -
getResponse
Get the currentServletResponseobject. -
setRequest
Set the currentServletRequestobject. -
setResponse
Set the currentServletResponseobject. -
toString
-
getRewriteContext
- Specified by:
getRewriteContextin interfaceRewrite- Overrides:
getRewriteContextin classAbstractRewrite
-