Clover coverage report - JFox Service-Oriented Application Framework - 1.0-M2 Coverage timestamp: 星期四 十一月 25 2004 17:14:11 PST FRAMES NO FRAMES |
file stats: | LOC: | 66 |  | Methods: | 2
| NCLOC: | 26 |  | Classes: | 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
Source file | Conditionals | Statements | Methods | TOTAL
InterceptorManagerImpl.java | 100% | 100% | 100% | 100% |

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.ArrayList;
13 |  |
     import java.util.Collection;
14 |  |
     import java.util.Iterator;
15 |  |
16 |  |
     import org.huihoo.jfox.soaf.schema.service.ServiceEntry;
17 |  |
     import org.huihoo.jfox.soaf.util.resource.ResourceHelper;
18 |  |
19 |  |
     /**
20 |  |
      * InterceptorManager imlementation.
21 |  |
      *
22 |  |
      * @author <a href="mailto:founder_chen@yahoo.com.cn">Peter Cheng </a>
23 |  |
      * @version $Revision: 1.4 $ $Date: 2004/10/28 05:12:04 $
24 |  |
      * @version Revision: 1.0
25 |  |
      */
26 |  |
27 |  |
     public class InterceptorManagerImpl implements InterceptorManager {
28 |  |
29 |  |
         private InterceptorChain interceptorChain = new InterceptorChainImpl();
30 |  |
31 |  |
         private Collection interceptorList = new ArrayList();
32 |  |
33 |  |
         /**
34 |  |
          * Process Interceptor.
35 |  |
          * @param interceptorColl
36 |  |
          * @param serviceModel
37 |  |
          *
38 |  |
          * @throws Throwable
39 |  |
          */
40 | 2 |
         public void processInterceptor(Collection interceptorColl,
41 |  |
                 Collection serviceEntryColl)
42 |  |
                 throws Throwable {
43 | 2 |
             instantiationInteceptor(interceptorColl);
44 | 2 |
             Iterator serviceEntryIter = serviceEntryColl.iterator();
45 | 2 |
             ServiceEntry serviceModel = null;
46 | 2 |
             while (serviceEntryIter.hasNext()) {
47 | 14 |
                 serviceModel = (ServiceEntry) serviceEntryIter.next();
48 | 14 |
                 interceptorChain.processInterceptor(interceptorList, serviceModel);
49 |  |
             }
50 |  |
         }
51 |  |
52 |  |
         /**
53 |  |
          * Init interceptor instance.
54 |  |
          * @param coll
55 |  |
          *            Interceptor collection
56 |  |
          *
57 |  |
          * @throws Throwable
58 |  |
          */
59 | 2 |
         private void instantiationInteceptor(Collection coll) throws Throwable {
60 | 2 |
             Iterator iter = coll.iterator();
61 | 2 |
             while (iter.hasNext()) {
62 | 4 |
                 interceptorList.add(ResourceHelper.instantiate((String) iter.next()));
63 |  |
             }
64 |  |
         }
65 |  |
66 |  |
     }