View Javadoc

1   /***
2    * JFoxSOAF, Service-Oriented Application Framework
3    * 
4    * Copyright (C) www.huihoo.org
5    * 
6    * Distributable under GNU LGPL For more information, please visit:
7    * http://www.huihoo.org/jfox/jfoxsoaf
8    */
9   
10  package org.huihoo.jfox.soaf.container;
11  
12  import java.util.Collection;
13  import java.util.Iterator;
14  
15  /***
16   * InterceptorChain implementation.
17   * 
18   * @author <a href="mailto:founder_chen@yahoo.com.cn">Peter Cheng </a>
19   * @version $Revision: 1.6 $ $Date: 2004/10/28 05:12:04 $
20   * @version Revision: 1.0
21   */
22  
23  public class InterceptorChainImpl implements InterceptorChain {
24  
25      /***
26       * Invoke intercetor stack.
27       * @param interceptorColl
28       * @param serviceEntryColl
29       * 
30       * @throws Throwable
31       */
32      public void processInterceptor(Collection interceptorColl,
33              ServiceEntry serviceModel)
34              throws Throwable {
35          Iterator interceptorIter = interceptorColl.iterator();
36          ServiceInterceptor serviceInterceptor = null;
37          while (interceptorIter.hasNext()) {
38              serviceInterceptor = (ServiceInterceptor) interceptorIter.next();
39              serviceInterceptor.invoke(serviceModel);
40          }
41      }
42  }