类 HessianExporter
- java.lang.Object
- org.springframework.remoting.support.RemotingSupport
- org.springframework.remoting.support.RemoteExporter
- org.springframework.remoting.caucho.HessianExporter
- 所有已实现的接口:
Aware
,BeanClassLoaderAware
,InitializingBean
public class HessianExporter extends RemoteExporter implements InitializingBean
General stream-based protocol exporter for a Hessian endpoint.Hessian is a slim, binary RPC protocol. For information on Hessian, see the Hessian website. Note: As of Spring 4.0, this exporter requires Hessian 4.0 or above.
- 从以下版本开始:
- 2.5.1
- 作者:
- Juergen Hoeller
- 另请参阅:
invoke(java.io.InputStream, java.io.OutputStream)
,HessianServiceExporter
,SimpleHessianServiceExporter
字段概要
字段 修饰符和类型 字段 说明 static String
CONTENT_TYPE_HESSIAN
从类继承的字段 org.springframework.remoting.support.RemotingSupport
logger
构造器概要
构造器 构造器 说明 HessianExporter()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
afterPropertiesSet()
Invoked by the containingBeanFactory
after it has set all bean properties and satisfiedBeanFactoryAware
,ApplicationContextAware
etc.protected void
doInvoke(com.caucho.hessian.server.HessianSkeleton skeleton, InputStream inputStream, OutputStream outputStream)
Actually invoke the skeleton with the given streams.void
invoke(InputStream inputStream, OutputStream outputStream)
Perform an invocation on the exported object.void
prepare()
Initialize this exporter.void
setAllowNonSerializable(boolean allowNonSerializable)
Set whether to allow non-serializable types as Hessian arguments and return values.void
setDebug(boolean debug)
Set whether Hessian's debug mode should be enabled, logging to this exporter's Commons Logging log.void
setRemoteResolver(com.caucho.hessian.io.HessianRemoteResolver remoteResolver)
Specify a custom HessianRemoteResolver to use for resolving remote object references.void
setSendCollectionType(boolean sendCollectionType)
Set whether to send the Java collection type for each serialized collection.void
setSerializerFactory(com.caucho.hessian.io.SerializerFactory serializerFactory)
Specify the Hessian SerializerFactory to use.从类继承的方法 org.springframework.remoting.support.RemoteExporter
checkService, checkServiceInterface, getExporterName, getProxyForService, getService, getServiceInterface, setInterceptors, setRegisterTraceInterceptor, setService, setServiceInterface
从类继承的方法 org.springframework.remoting.support.RemotingSupport
getBeanClassLoader, overrideThreadContextClassLoader, resetThreadContextClassLoader, setBeanClassLoader
字段详细资料
CONTENT_TYPE_HESSIAN
public static final String CONTENT_TYPE_HESSIAN
- 另请参阅:
- 常量字段值
构造器详细资料
HessianExporter
public HessianExporter()
方法详细资料
setSerializerFactory
public void setSerializerFactory(com.caucho.hessian.io.SerializerFactory serializerFactory)
Specify the Hessian SerializerFactory to use.This will typically be passed in as an inner bean definition of type
com.caucho.hessian.io.SerializerFactory
, with custom bean property values applied.
setSendCollectionType
public void setSendCollectionType(boolean sendCollectionType)
Set whether to send the Java collection type for each serialized collection. Default is "true".
setAllowNonSerializable
public void setAllowNonSerializable(boolean allowNonSerializable)
Set whether to allow non-serializable types as Hessian arguments and return values. Default is "true".
setRemoteResolver
public void setRemoteResolver(com.caucho.hessian.io.HessianRemoteResolver remoteResolver)
Specify a custom HessianRemoteResolver to use for resolving remote object references.
setDebug
public void setDebug(boolean debug)
Set whether Hessian's debug mode should be enabled, logging to this exporter's Commons Logging log. Default is "false".- 另请参阅:
HessianProxyFactory.setDebug(boolean)
afterPropertiesSet
public void afterPropertiesSet()
从接口复制的说明:InitializingBean
Invoked by the containingBeanFactory
after it has set all bean properties and satisfiedBeanFactoryAware
,ApplicationContextAware
etc.This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
- 指定者:
afterPropertiesSet
在接口中InitializingBean
prepare
public void prepare()
Initialize this exporter.
invoke
public void invoke(InputStream inputStream, OutputStream outputStream) throws Throwable
Perform an invocation on the exported object.- 参数:
inputStream
- the request streamoutputStream
- the response stream- 抛出:
Throwable
- if invocation failed
doInvoke
protected void doInvoke(com.caucho.hessian.server.HessianSkeleton skeleton, InputStream inputStream, OutputStream outputStream) throws Throwable
Actually invoke the skeleton with the given streams.- 参数:
skeleton
- the skeleton to invokeinputStream
- the request streamoutputStream
- the response stream- 抛出:
Throwable
- if invocation failed