com.caucho.hessian.client
Class HessianProxy

java.lang.Object
  extended by com.caucho.hessian.client.HessianProxy
All Implemented Interfaces:
java.lang.reflect.InvocationHandler

public class HessianProxy
extends java.lang.Object
implements java.lang.reflect.InvocationHandler

Proxy implementation for Hessian clients. Applications will generally use HessianProxyFactory to create proxy clients.


Nested Class Summary
(package private) static class HessianProxy.ResultInputStream
           
 
Field Summary
private  HessianProxyFactory _factory
           
private  java.util.WeakHashMap<java.lang.reflect.Method,java.lang.String> _mangleMap
           
private  java.net.URL _url
           
private static java.util.logging.Logger log
           
 
Constructor Summary
HessianProxy(HessianProxyFactory factory, java.net.URL url)
           
 
Method Summary
 java.net.URL getURL()
          Returns the proxy's URL.
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
          Handles the object invocation.
protected  java.lang.String mangleName(java.lang.reflect.Method method)
           
protected  java.net.URLConnection sendRequest(java.lang.String methodName, java.lang.Object[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final java.util.logging.Logger log

_factory

private HessianProxyFactory _factory

_mangleMap

private java.util.WeakHashMap<java.lang.reflect.Method,java.lang.String> _mangleMap

_url

private java.net.URL _url
Constructor Detail

HessianProxy

HessianProxy(HessianProxyFactory factory,
             java.net.URL url)
Method Detail

getURL

public java.net.URL getURL()
Returns the proxy's URL.


invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Handles the object invocation.

Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Parameters:
proxy - the proxy object to invoke
method - the method to call
args - the arguments to the proxy object
Throws:
java.lang.Throwable

mangleName

protected java.lang.String mangleName(java.lang.reflect.Method method)

sendRequest

protected java.net.URLConnection sendRequest(java.lang.String methodName,
                                             java.lang.Object[] args)
                                      throws java.io.IOException
Throws:
java.io.IOException