|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.remoting.support.RemoteAccessor org.springframework.remoting.support.UrlBasedRemoteAccessor org.xins.common.spring.XinsClientInterceptor
Interceptor for accessing a specific XINS API. This class requires the Spring library.
Field Summary | |
protected AbstractCAPI |
capi
The CAPI used to call the web service. |
Fields inherited from class org.springframework.remoting.support.RemoteAccessor |
logger |
Constructor Summary | |
XinsClientInterceptor()
|
Method Summary | |
void |
afterPropertiesSet()
|
protected org.springframework.remoting.RemoteAccessException |
convertXinsAccessException(Throwable ex)
Convert the given XINS exception to an appropriate Spring RemoteAccessException. |
AbstractCAPI |
createCapi()
Creates the CAPI to call the API. |
Descriptor |
createDescriptor()
Creates the Descriptor containing the location of the API. |
XINSServiceCaller |
createXinsServiceCaller()
Creates the XINSServiceCaller to call the API. |
String |
getServiceName()
Gets the name of the API to call. |
Object |
invoke(org.aopalliance.intercept.MethodInvocation invocation)
|
void |
prepare()
|
void |
setServiceName(String serviceName)
Sets the name of the API to call. |
void |
setServiceProperties(Properties descriptorProperties)
Sets the location of the API to call. |
void |
setTimeout(int timeout)
Sets the time-out for the call of the API. |
Methods inherited from class org.springframework.remoting.support.UrlBasedRemoteAccessor |
getServiceUrl, setServiceUrl |
Methods inherited from class org.springframework.remoting.support.RemoteAccessor |
getServiceInterface, setServiceInterface |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected AbstractCAPI capi
Constructor Detail |
public XinsClientInterceptor()
Method Detail |
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
public void prepare()
public void setServiceProperties(Properties descriptorProperties)
UrlBasedRemoteAccessor.setServiceUrl(java.lang.String)
and setTimeout(int)
methods.
descriptorProperties
- the different destination as explained in
DescriptorBuilder.public void setTimeout(int timeout)
UrlBasedRemoteAccessor.setServiceUrl(java.lang.String)
.
timeout
- the time-out for the call in milliseconds. This parameter will be used
for the connection time-out, socket time-out and total time-out.public void setServiceName(String serviceName)
serviceName
- the name of the API to call.public String getServiceName()
public Descriptor createDescriptor() throws Exception
Descriptor
containing the location of the API.
null
no descriptorProperties or serviceURL is set.
Exception
- if the descriptorProperties or serviceURL is incorrect.public AbstractCAPI createCapi() throws Exception
Exception
- if the CAPI class is not found or the descriptor cannot be created.public XINSServiceCaller createXinsServiceCaller() throws Exception
Exception
- if the descriptor cannot be created or is incorrect.public Object invoke(org.aopalliance.intercept.MethodInvocation invocation) throws Throwable
invoke
in interface org.aopalliance.intercept.MethodInterceptor
Throwable
protected org.springframework.remoting.RemoteAccessException convertXinsAccessException(Throwable ex)
ex
- the exception to convert.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |