EMMA Coverage Report (generated Tue Feb 12 22:23:49 ICT 2008)
[all classes][net.sourceforge.hiveremoting.caucho]

COVERAGE SUMMARY FOR SOURCE FILE [HessianProxy.java]

nameclass, %method, %block, %line, %
HessianProxy.java0%   (0/1)0%   (0/5)0%   (0/68)0%   (0/18)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class HessianProxy0%   (0/1)0%   (0/5)0%   (0/68)0%   (0/18)
HessianProxy (CauchoProxyContribution, SerializerFactory, HttpConnectionManag... 0%   (0/1)0%   (0/11)0%   (0/3)
callMethod (OutputStream, String, Object []): void 0%   (0/1)0%   (0/24)0%   (0/7)
createException (String): RuntimeException 0%   (0/1)0%   (0/5)0%   (0/1)
createException (Throwable): RuntimeException 0%   (0/1)0%   (0/5)0%   (0/1)
getReturnValue (InputStream, Class): Object 0%   (0/1)0%   (0/23)0%   (0/6)

1//  Copyright 2004-2007 Jean-Francois Poilpret
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14 
15package net.sourceforge.hiveremoting.caucho;
16 
17import java.io.InputStream;
18import java.io.OutputStream;
19 
20import org.apache.commons.httpclient.HttpConnectionManager;
21import org.apache.commons.logging.Log;
22 
23import com.caucho.hessian.client.HessianRuntimeException;
24import com.caucho.hessian.io.AbstractHessianInput;
25import com.caucho.hessian.io.AbstractHessianOutput;
26import com.caucho.hessian.io.Hessian2Input;
27import com.caucho.hessian.io.Hessian2Output;
28import com.caucho.hessian.io.HessianInput;
29import com.caucho.hessian.io.HessianOutput;
30import com.caucho.hessian.io.SerializerFactory;
31 
32/**
33 * Dynamic proxy for Caucho Hessian protocol on client side.
34 *
35 * @author        Jean-Francois Poilpret
36 */
37public class HessianProxy extends AbstractCauchoProxy
38{
39        public HessianProxy(        CauchoProxyContribution        contrib,
40                                                        SerializerFactory                factory,
41                                                        HttpConnectionManager        cnxManager,
42                                                        Log                                                logger)
43        {
44                super(contrib, factory, cnxManager, logger);
45                _version = contrib.getProtocolVersion();
46        }
47 
48        //CSOFF: IllegalThrowsCheck
49        @Override protected Object        getReturnValue(InputStream is, Class type)
50                throws Throwable
51        {
52                AbstractHessianInput in;
53                if (_version == 2)
54                {
55                        in = new Hessian2Input(is);
56                }
57                else
58                {
59                        in = new HessianInput(is);
60                }
61                // Set special Serializer Factory
62                in.setSerializerFactory(_factory);
63                //####in.setRemoteResolver(getRemoteResolver());
64                return in.readReply(type);
65        }
66        //CSON: IllegalThrowsCheck
67 
68        //CSOFF: IllegalThrowsCheck
69        @Override protected void        callMethod(OutputStream os, String method, Object[] args)
70                throws Throwable
71        {
72                AbstractHessianOutput out;
73                if (_version == 2)
74                {
75                        out = new Hessian2Output(os);
76                }
77                else
78                {
79                        out = new HessianOutput(os);
80                }
81                // Set special Serializer Factory
82                out.setSerializerFactory(_factory);
83                out.call(method, args);
84        }
85        //CSON: IllegalThrowsCheck
86        
87        @Override protected RuntimeException        createException(String message)
88        {
89                return new HessianRuntimeException(message);
90        }
91        
92        @Override protected RuntimeException        createException(Throwable cause)
93        {
94                return new HessianRuntimeException(cause);
95        }
96        
97        protected final int        _version;
98}

[all classes][net.sourceforge.hiveremoting.caucho]
EMMA 2.0.5312 (C) Vladimir Roubtsov