|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.web.servlet.handler.HandlerInterceptorAdapter
com.veriplace.web.spring.VeriplaceInterceptor
public class VeriplaceInterceptor
Base class for Veriplace-defined Spring Interceptors. Holds a reference to a
Veriplace instance, and uses it to obtain a
VeriplaceState for each request. Your controller
can get the VeriplaceState object by calling
VeriplaceState.getFromRequest(HttpServletRequest).
After the controller executes, the interceptor also adds the VeriplaceState as a
model object, using the name defined by the current StatusHandler's
AbstractStatusViewRenderer.getStateAttributeName().
Besides being a base class for the other Interceptors, this class can be used by itself if you need to provide a VeriplaceState to a controller, but do not need to do location/user discovery ahead of time.
| Field Summary | |
|---|---|
protected Veriplace |
veriplace
|
| Constructor Summary | |
|---|---|
VeriplaceInterceptor()
|
|
| Method Summary | |
|---|---|
Veriplace |
getVeriplace()
|
protected Client |
getVeriplaceClient(HttpServletRequest request)
Override this method if you might need to use a different Veriplace Client for some
requests -- for instance, if the same interceptor is handling requests for more than one Veriplace
application, each with its own consumer key and token. |
protected boolean |
handleInternal(VeriplaceState state,
HttpServletRequest request,
HttpServletResponse response)
Override this method to do any necessary preprocessing of the request based on the corresponding VeriplaceState. |
void |
postHandle(HttpServletRequest request,
HttpServletResponse response,
java.lang.Object handler,
ModelAndView mv)
|
boolean |
preHandle(HttpServletRequest request,
HttpServletResponse response,
java.lang.Object handler)
|
ModelAndView |
resolveException(HttpServletRequest request,
HttpServletResponse response,
java.lang.Object handler,
java.lang.Exception ex)
Handle RespondedExceptions by doing nothing. |
void |
setVeriplace(Veriplace veriplace)
Specifies the Veriplace instance this interceptor will use. |
| Methods inherited from class org.springframework.web.servlet.handler.HandlerInterceptorAdapter |
|---|
afterCompletion |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Veriplace veriplace
| Constructor Detail |
|---|
public VeriplaceInterceptor()
| Method Detail |
|---|
public Veriplace getVeriplace()
public void setVeriplace(Veriplace veriplace)
Veriplace instance this interceptor will use.
public void postHandle(HttpServletRequest request,
HttpServletResponse response,
java.lang.Object handler,
ModelAndView mv)
throws java.lang.Exception
postHandle in interface HandlerInterceptorpostHandle in class HandlerInterceptorAdapterjava.lang.Exception
public boolean preHandle(HttpServletRequest request,
HttpServletResponse response,
java.lang.Object handler)
throws java.lang.Exception
preHandle in interface HandlerInterceptorpreHandle in class HandlerInterceptorAdapterjava.lang.Exception
protected Client getVeriplaceClient(HttpServletRequest request)
throws ServletException,
java.io.IOException
Client for some
requests -- for instance, if the same interceptor is handling requests for more than one Veriplace
application, each with its own consumer key and token. A Client is a fairly lightweight object, so
it's acceptable to create a new one for each request if you want to.
ServletException
java.io.IOException
protected boolean handleInternal(VeriplaceState state,
HttpServletRequest request,
HttpServletResponse response)
throws java.lang.Exception
VeriplaceState.
java.lang.Exception
public ModelAndView resolveException(HttpServletRequest request,
HttpServletResponse response,
java.lang.Object handler,
java.lang.Exception ex)
RespondedExceptions by doing nothing.
resolveException in interface HandlerExceptionResolver
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||