com.dyuproject.web.rest
Class ConsumerInterceptor

java.lang.Object
  extended by com.dyuproject.web.rest.AbstractLifeCycle
      extended by com.dyuproject.web.rest.ConsumerInterceptor
All Implemented Interfaces:
Interceptor, LifeCycle

public final class ConsumerInterceptor
extends AbstractLifeCycle
implements Interceptor

An interceptor that checks sets the mapped Consumer in the RequestContext for use with the REST handlers.

Author:
David Yu
Date created:
Jan 18, 2009

Constructor Summary
ConsumerInterceptor()
           
 
Method Summary
 void addConsumer(ValidatingConsumer consumer)
           
protected  void init()
           
 void postHandle(boolean handled, RequestContext requestContext)
           
 boolean preHandle(RequestContext requestContext)
           
 
Methods inherited from class com.dyuproject.web.rest.AbstractLifeCycle
destroy, destroy, getWebContext, init, isDestroyed, isInitialized, newObjectInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.dyuproject.web.rest.LifeCycle
destroy, init
 

Constructor Detail

ConsumerInterceptor

public ConsumerInterceptor()
Method Detail

init

protected void init()
Specified by:
init in class AbstractLifeCycle

addConsumer

public void addConsumer(ValidatingConsumer consumer)

postHandle

public void postHandle(boolean handled,
                       RequestContext requestContext)
Specified by:
postHandle in interface Interceptor

preHandle

public boolean preHandle(RequestContext requestContext)
                  throws ServletException,
                         IOException
Specified by:
preHandle in interface Interceptor
Throws:
ServletException
IOException


Copyright © 2008-2013. All Rights Reserved.