Clover coverage report - ActiveIO - 1.0 Coverage timestamp: Fri Apr 22 2005 14:27:22 PDT FRAMES NO FRAMES |
file stats: | LOC: | 96 |  | Methods: | 10
| NCLOC: | 37 |  | 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
FilterSynchChannel.java | 50% | 91.7% | 100% | 91.7% |

1 |  |
     /**
2 |  |
      *
3 |  |
      * Copyright 2004 Hiram Chirino
4 |  |
      *
5 |  |
      *  Licensed under the Apache License, Version 2.0 (the "License");
6 |  |
      *  you may not use this file except in compliance with the License.
7 |  |
      *  You may obtain a copy of the License at
8 |  |
      *
9 |  |
      *     http://www.apache.org/licenses/LICENSE-2.0
10 |  |
      *
11 |  |
      *  Unless required by applicable law or agreed to in writing, software
12 |  |
      *  distributed under the License is distributed on an "AS IS" BASIS,
13 |  |
      *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 |  |
      *  See the License for the specific language governing permissions and
15 |  |
      *  limitations under the License.
16 |  |
      */
17 |  |
     package org.activeio;
18 |  |
19 |  |
     import java.io.IOException;
20 |  |
21 |  |
22 |  |
     /**
23 |  |
      * A SynchChannelFilter can be used as a filter another {@see org.activeio.SynchChannel}
24 |  |
      * Most {@see org.activeio.SynchChannel} that are not directly accessing the network will
25 |  |
      * extends the SynchChannelFilter since they act as a filter between the client and the network.
26 |  |
      *
27 |  |
      * @version $Revision$
28 |  |
      */
29 |  |
     public class FilterSynchChannel implements SynchChannel {
30 |  |
31 |  |
         private final SynchChannel next;
32 |  |
33 | 78 |
         public FilterSynchChannel(SynchChannel next) {
34 | 78 |
             this.next = next;
35 |  |
         }
36 |  |
37 |  |
         /**
38 |  |
          * @see org.activeio.Channel#write(org.activeio.channel.Packet)
39 |  |
          */
40 | 124 |
         public void write(Packet packet) throws IOException {
41 | 124 |
             next.write(packet);
42 |  |
         }
43 |  |
44 |  |
         /**
45 |  |
          * @see org.activeio.Channel#flush()
46 |  |
          */
47 | 121 |
         public void flush() throws IOException {
48 | 121 |
             next.flush();
49 |  |
         }
50 |  |
51 |  |
         /**
52 |  |
          * @see org.activeio.Disposable#dispose()
53 |  |
          */
54 | 74 |
         public void dispose() {
55 | 74 |
             next.dispose();
56 |  |
         }
57 |  |
58 |  |
         /**
59 |  |
          * @see org.activeio.Service#start()
60 |  |
          */
61 | 70 |
         public void start() throws IOException {
62 | 70 |
             next.start();
63 |  |
         }
64 |  |
65 |  |
         /**
66 |  |
          * @see org.activeio.Service#stop(long)
67 |  |
          */
68 | 12 |
         public void stop(long timeout) throws IOException {
69 | 12 |
             next.stop(timeout);
70 |  |
         }
71 |  |
72 |  |
         /**
73 |  |
          * @return Returns the next.
74 |  |
          */
75 | 2093 |
         public SynchChannel getNext() {
76 | 2093 |
             return next;
77 |  |
         }
78 |  |
79 |  |
         /**
80 |  |
          * @see org.activeio.SynchChannel#read(long)
81 |  |
          */
82 | 2158 |
         public Packet read(long timeout) throws IOException {
83 | 2158 |
             return next.read(timeout);
84 |  |
         }
85 |  |
86 | 58 |
         public Object narrow(Class target) {
87 | 58 |
             if( target.isAssignableFrom(getClass()) ) {
88 | 0 |
                 return this;
89 |  |
             }
90 | 58 |
             return next.narrow(target);
91 |  |
         }
92 |  |
93 | 24 |
         public String toString() {
94 | 24 |
             return next.toString();
95 |  |
         }
96 |  |
     }