com.dyuproject.web.rest
Class InterceptorCollection
java.lang.Object
com.dyuproject.web.rest.AbstractLifeCycle
com.dyuproject.web.rest.InterceptorCollection
- All Implemented Interfaces:
- Interceptor, LifeCycle
public final class InterceptorCollection
- extends AbstractLifeCycle
- implements Interceptor
Wraps an array of interceptors and does the handle chain.
Interceptors can be added/removed at runtime.
- Author:
- David Yu
- Date created:
- May 18, 2008
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InterceptorCollection
public InterceptorCollection()
addInterceptor
public InterceptorCollection addInterceptor(Interceptor interceptor)
add
public boolean add(Interceptor interceptor)
indexOf
public int indexOf(Interceptor interceptor)
remove
public boolean remove(Interceptor interceptor)
remove
public boolean remove(int idx)
setInterceptors
public void setInterceptors(Interceptor[] interceptors)
getInterceptors
public Interceptor[] getInterceptors()
init
protected void init()
- Specified by:
init
in class AbstractLifeCycle
destroy
protected void destroy()
- Overrides:
destroy
in class AbstractLifeCycle
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.