net.sourceforge.hiveremoting.caucho
Class AbstractCauchoProxy
java.lang.Object
net.sourceforge.hiveremoting.caucho.AbstractCauchoProxy
- All Implemented Interfaces:
- java.lang.reflect.InvocationHandler
- Direct Known Subclasses:
- BurlapProxy, HessianProxy
public abstract class AbstractCauchoProxy
- extends java.lang.Object
- implements java.lang.reflect.InvocationHandler
Abstract dynamic proxy for Caucho protocols on client side (used for Hessian
and Burlap).
This proxy is based on commons-httpclient for better connection management.
In particular, it handles cookies, https.
- Author:
- Jean-Francois Poilpret
Constructor Summary |
protected |
AbstractCauchoProxy(CauchoProxyContribution contrib,
com.caucho.hessian.io.SerializerFactory factory,
org.apache.commons.httpclient.HttpConnectionManager cnxManager,
org.apache.commons.logging.Log logger)
|
Method Summary |
protected abstract void |
callMethod(java.io.OutputStream os,
java.lang.String method,
java.lang.Object[] args)
|
protected void |
close(java.io.InputStream is)
|
protected abstract java.lang.RuntimeException |
createException(java.lang.String message)
|
protected abstract java.lang.RuntimeException |
createException(java.lang.Throwable cause)
|
protected abstract java.lang.Object |
getReturnValue(java.io.InputStream is,
java.lang.Class type)
|
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_logger
protected final org.apache.commons.logging.Log _logger
_httpClient
protected final org.apache.commons.httpclient.HttpClient _httpClient
_url
protected final java.lang.String _url
_overloadEnabled
protected final boolean _overloadEnabled
_factory
protected final com.caucho.hessian.io.SerializerFactory _factory
_gzipThreshold
protected final int _gzipThreshold
_gzipInBufferSize
protected final int _gzipInBufferSize
_handler
protected final RemoteContextHandler _handler
_callContextHandlerOnError
protected final boolean _callContextHandlerOnError
AbstractCauchoProxy
protected AbstractCauchoProxy(CauchoProxyContribution contrib,
com.caucho.hessian.io.SerializerFactory factory,
org.apache.commons.httpclient.HttpConnectionManager cnxManager,
org.apache.commons.logging.Log logger)
invoke
public java.lang.Object invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Throwable
- Specified by:
invoke
in interface java.lang.reflect.InvocationHandler
- Throws:
java.lang.Throwable
close
protected void close(java.io.InputStream is)
callMethod
protected abstract void callMethod(java.io.OutputStream os,
java.lang.String method,
java.lang.Object[] args)
throws java.lang.Throwable
- Throws:
java.lang.Throwable
getReturnValue
protected abstract java.lang.Object getReturnValue(java.io.InputStream is,
java.lang.Class type)
throws java.lang.Throwable
- Throws:
java.lang.Throwable
createException
protected abstract java.lang.RuntimeException createException(java.lang.String message)
createException
protected abstract java.lang.RuntimeException createException(java.lang.Throwable cause)