public class XRemotingClientInterceptor
extends org.springframework.remoting.support.UrlBasedRemoteAccessor
implements org.aopalliance.intercept.MethodInterceptor
HttpInvokerClientInterceptor,
HessianClientInterceptor,
BurlapClientInterceptor| Constructor and Description |
|---|
XRemotingClientInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected org.springframework.remoting.RemoteAccessException |
convertXRemotingAccessException(Throwable ex) |
protected HttpClientBuilder |
createAndConfigureHttpClientBuilder() |
protected Requester |
createComplexRequester() |
protected org.apache.commons.httpclient.HttpClient |
createHttpClient() |
protected HttpConnectionFactory |
createHttpConnectionFactory() |
protected XRemotingProxyFactory |
createProxyFactory() |
protected Requester |
createRequester() |
protected Requester |
createSimpleRequester() |
protected Object |
createXRemotingProxy(XRemotingProxyFactory proxyFactory) |
protected ClassLoader |
getBeanClassLoader() |
Object |
invoke(org.aopalliance.intercept.MethodInvocation invocation) |
void |
prepare()
Initializes the interceptor.
|
void |
setAuthPreemptive(boolean authPreemptive)
Sets whether to use authPreemptive by a built HttpClient (for Basic auth).
|
void |
setBasicAuthHost(String basicAuthHost)
Sets a host for which Basic auth will be used by a built HttpClient.
|
void |
setBasicAuthPort(int basicAuthPort)
Sets a port for which Basic auth will be used by a built HttpClient.
|
void |
setBeanClassLoader(ClassLoader beanClassLoader)
Sets classloader to use when constructing a Proxy.
|
void |
setConnectionManagerTimeout(long connectionManagerTimeout)
Sets maximum time to wait for connection to be obtained from
a connection manager (in millis).
|
void |
setConnectionTimeout(int connectionTimeout)
Sets connection timeout (in millis).
|
void |
setHttpClient(Object httpClient)
Sets an HttpClient to use with
CommonsHttpClientRequester. |
void |
setKeyStorePassword(String keyStorePassword)
Sets a key store password to be used by a built HttpClient.
|
void |
setKeyStoreResource(org.springframework.core.io.Resource keyStoreResource)
Sets a key store resource to be used by a built HttpClient.
|
void |
setKeyStoreUrl(URL keyStoreUrl)
Sets a key store URL to be used by a built HttpClient.
|
void |
setPassword(String password)
Sets a password to be used by a built HttpClient (for Basic auth).
|
void |
setProxyHost(String proxyHost)
Sets a proxy host to be used by a built HttpClient.
|
void |
setProxyPort(int proxyPort)
Sets a proxy port to be used by a built HttpClient.
|
void |
setRequester(Requester requester)
Sets a
Requester to use. |
void |
setSoTimeout(int soTimeout)
Sets SO timeout (in millis).
|
void |
setSslEnabledProtocols(String[] sslEnabledProtocols)
Sets a list of enabled SSL protocols.
|
void |
setSslHost(String sslHost)
Sets SSL host to be used by a built HttpClient.
|
void |
setSslPort(int sslPort)
Sets SSL port to be used by a built HttpClient.
|
void |
setTrustKeyStorePassword(String trustKeyStorePassword)
Sets a trust store password to be used by a built HttpClient.
|
void |
setTrustKeyStoreResource(org.springframework.core.io.Resource trustKeyStoreResource)
Sets a trust store resource to be used by a built HttpClient.
|
void |
setTrustKeyStoreUrl(URL trustKeyStoreUrl)
Sets a trust store URL to be used by a built HttpClient.
|
void |
setUsername(String username)
Sets a username to be used by a built HttpClient (for Basic auth).
|
getServiceUrl, setServiceUrlpublic void setBeanClassLoader(ClassLoader beanClassLoader)
beanClassLoader - classloaderpublic void setRequester(Requester requester)
Requester to use. If this is set, requester will not
be built but this one will be used.requester - requesterpublic void setHttpClient(Object httpClient)
CommonsHttpClientRequester. If
setRequester(Requester) is not called, then
CommonsHttpClientRequester will use the supplied HttpClient instead of
building it from configuration like proxy config, SSL config etc.httpClient - HTTPClient to setpublic void setProxyHost(String proxyHost)
setRequester(Requester),
setHttpClient(Object).proxyHost - hostpublic void setProxyPort(int proxyPort)
setRequester(Requester),
setHttpClient(Object).proxyPort - portpublic void setUsername(String username)
setRequester(Requester),
setHttpClient(Object).username - namepublic void setPassword(String password)
setRequester(Requester),
setHttpClient(Object).password - passwordpublic void setAuthPreemptive(boolean authPreemptive)
setRequester(Requester),
setHttpClient(Object).authPreemptive - valuepublic void setBasicAuthHost(String basicAuthHost)
setRequester(Requester),
setHttpClient(Object).basicAuthHost - hostpublic void setBasicAuthPort(int basicAuthPort)
setRequester(Requester),
setHttpClient(Object).basicAuthPort - portpublic void setTrustKeyStoreUrl(URL trustKeyStoreUrl)
setRequester(Requester),
setHttpClient(Object).trustKeyStoreUrl - URLpublic void setTrustKeyStoreResource(org.springframework.core.io.Resource trustKeyStoreResource)
setRequester(Requester),
setHttpClient(Object).trustKeyStoreResource - resourcepublic void setKeyStoreUrl(URL keyStoreUrl)
setRequester(Requester),
setHttpClient(Object).keyStoreUrl - URLpublic void setKeyStoreResource(org.springframework.core.io.Resource keyStoreResource)
setRequester(Requester),
setHttpClient(Object).keyStoreResource - resourcepublic void setTrustKeyStorePassword(String trustKeyStorePassword)
setRequester(Requester),
setHttpClient(Object).trustKeyStorePassword - passwordpublic void setKeyStorePassword(String keyStorePassword)
setRequester(Requester),
setHttpClient(Object).keyStorePassword - passwordpublic void setSslHost(String sslHost)
UrlBasedRemoteAccessor.getServiceUrl()).
Only used if HttpClient is built (see setRequester(Requester),
setHttpClient(Object).sslHost - hostpublic void setSslPort(int sslPort)
UrlBasedRemoteAccessor.getServiceUrl()).
Only used if HttpClient is built (see setRequester(Requester),
setHttpClient(Object).sslPort - portpublic void setSslEnabledProtocols(String[] sslEnabledProtocols)
sslEnabledProtocols - protocolspublic void setConnectionTimeout(int connectionTimeout)
connectionTimeout - connection timeout (millis)public void setSoTimeout(int soTimeout)
soTimeout - SO timeout (millis)public void setConnectionManagerTimeout(long connectionManagerTimeout)
connectionManagerTimeout - connection manager timeout (millis)protected final ClassLoader getBeanClassLoader()
public void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanafterPropertiesSet in class org.springframework.remoting.support.UrlBasedRemoteAccessorpublic void prepare()
throws IOException
IOException - thrown if truststore or keystore could not be
obtainedprotected XRemotingProxyFactory createProxyFactory() throws IOException
IOExceptionprotected Requester createRequester() throws IOException
IOExceptionprotected Requester createSimpleRequester()
protected HttpConnectionFactory createHttpConnectionFactory()
protected Requester createComplexRequester() throws IOException
IOExceptionprotected org.apache.commons.httpclient.HttpClient createHttpClient()
throws IOException
IOExceptionprotected HttpClientBuilder createAndConfigureHttpClientBuilder() throws IOException
IOExceptionprotected Object createXRemotingProxy(XRemotingProxyFactory proxyFactory)
public Object invoke(org.aopalliance.intercept.MethodInvocation invocation) throws Throwable
invoke in interface org.aopalliance.intercept.MethodInterceptorThrowableprotected org.springframework.remoting.RemoteAccessException convertXRemotingAccessException(Throwable ex)
Copyright © 2015. All Rights Reserved.