/** * Set whether version 2 of the Hessian protocol should be used for * parsing requests and replies. Default is "false". * @see com.caucho.hessian.client.HessianProxyFactory#setHessian2Request */ public void setHessian2(boolean hessian2) { this.proxyFactory.setHessian2Request(hessian2); this.proxyFactory.setHessian2Reply(hessian2); }
/** * Set the timeout to use when waiting for a reply from the Hessian service. * @see com.caucho.hessian.client.HessianProxyFactory#setReadTimeout */ public void setReadTimeout(long timeout) { this.proxyFactory.setReadTimeout(timeout); }
/** * Set whether Hessian's debug mode should be enabled. * Default is "false". * @see com.caucho.hessian.client.HessianProxyFactory#setDebug */ public void setDebug(boolean debug) { this.proxyFactory.setDebug(debug); }
/** * Create the Hessian proxy that is wrapped by this interceptor. * @param proxyFactory the proxy factory to use * @return the Hessian proxy * @throws MalformedURLException if thrown by the proxy factory * @see com.caucho.hessian.client.HessianProxyFactory#create */ protected Object createHessianProxy(HessianProxyFactory proxyFactory) throws MalformedURLException { Assert.notNull(getServiceInterface(), "'serviceInterface' is required"); return proxyFactory.create(getServiceInterface(), getServiceUrl(), getBeanClassLoader()); }
/** * Set the HessianProxyFactory instance to use. * If not specified, a default HessianProxyFactory will be created. * <p>Allows to use an externally configured factory instance, * in particular a custom HessianProxyFactory subclass. */ public void setProxyFactory(@Nullable HessianProxyFactory proxyFactory) { this.proxyFactory = (proxyFactory != null ? proxyFactory : new HessianProxyFactory()); }
@Override public HessianConnection open(URL url) throws IOException { HessianConnection connection = super.open(url); RpcContext context = RpcContext.getContext(); for (String key : context.getAttachments().keySet()) { connection.addHeader(Constants.DEFAULT_EXCHANGER + key, context.getAttachment(key)); } return connection; } }
/** * Specify a custom HessianConnectionFactory to use for the Hessian client. */ public void setConnectionFactory(HessianConnectionFactory connectionFactory) { this.proxyFactory.setConnectionFactory(connectionFactory); }
/** * Set the password that this factory should use to access the remote service. * Default is none. * <p>The password will be sent by Hessian via HTTP Basic Authentication. * @see com.caucho.hessian.client.HessianProxyFactory#setPassword */ public void setPassword(String password) { this.proxyFactory.setPassword(password); }
/** * Set the username that this factory should use to access the remote service. * Default is none. * <p>The username will be sent by Hessian via HTTP Basic Authentication. * @see com.caucho.hessian.client.HessianProxyFactory#setUser */ public void setUsername(String username) { this.proxyFactory.setUser(username); }
/** * Set whether version 2 of the Hessian protocol should be used for * parsing requests. Default is "false". * @see com.caucho.hessian.client.HessianProxyFactory#setHessian2Request */ public void setHessian2Request(boolean hessian2) { this.proxyFactory.setHessian2Request(hessian2); }
/** * Set the socket connect timeout to use for the Hessian client. * @see com.caucho.hessian.client.HessianProxyFactory#setConnectTimeout */ public void setConnectTimeout(long timeout) { this.proxyFactory.setConnectTimeout(timeout); }
/** * Set whether to allow non-serializable types as Hessian arguments * and return values. Default is "true". */ public void setAllowNonSerializable(boolean allowNonSerializable) { this.proxyFactory.getSerializerFactory().setAllowNonSerializable(allowNonSerializable); }
/** * Set whether overloaded methods should be enabled for remote invocations. * Default is "false". * @see com.caucho.hessian.client.HessianProxyFactory#setOverloadEnabled */ public void setOverloadEnabled(boolean overloadEnabled) { this.proxyFactory.setOverloadEnabled(overloadEnabled); }
/** * Set whether version 2 of the Hessian protocol should be used for * parsing replies. Default is "false". * @see com.caucho.hessian.client.HessianProxyFactory#setHessian2Reply */ public void setHessian2Reply(boolean hessian2) { this.proxyFactory.setHessian2Reply(hessian2); }
/** * Specify the Hessian SerializerFactory to use. * <p>This will typically be passed in as an inner bean definition * of type {@code com.caucho.hessian.io.SerializerFactory}, * with custom bean property values applied. */ public void setSerializerFactory(SerializerFactory serializerFactory) { this.proxyFactory.setSerializerFactory(serializerFactory); }
/** * Set whether to use a chunked post for sending a Hessian request. * @see com.caucho.hessian.client.HessianProxyFactory#setChunkedPost */ public void setChunkedPost(boolean chunkedPost) { this.proxyFactory.setChunkedPost(chunkedPost); }
@Override public HessianConnection open(URL url) throws IOException { HessianConnection connection = super.open(url); RpcContext context = RpcContext.getContext(); for (String key : context.getAttachments().keySet()) { connection.addHeader(Constants.DEFAULT_EXCHANGER + key, context.getAttachment(key)); } return connection; } }
/** * Specify a custom HessianConnectionFactory to use for the Hessian client. */ public void setConnectionFactory(HessianConnectionFactory connectionFactory) { this.proxyFactory.setConnectionFactory(connectionFactory); }
/** * Set the socket connect timeout to use for the Hessian client. * @see com.caucho.hessian.client.HessianProxyFactory#setConnectTimeout */ public void setConnectTimeout(long timeout) { this.proxyFactory.setConnectTimeout(timeout); }
/** * Set whether to send the Java collection type for each serialized * collection. Default is "true". */ public void setSendCollectionType(boolean sendCollectionType) { this.proxyFactory.getSerializerFactory().setSendCollectionType(sendCollectionType); }