org.springframework.remoting.httpinvoker
Class HttpInvokerClientInterceptor
java.lang.Object
org.springframework.remoting.support.RemoteAccessor
org.springframework.remoting.support.UrlBasedRemoteAccessor
org.springframework.remoting.support.RemoteInvocationBasedAccessor
org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor
- All Implemented Interfaces:
- org.aopalliance.aop.Advice, HttpInvokerClientConfiguration, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor
- Direct Known Subclasses:
- HttpInvokerProxyFactoryBean
- public class HttpInvokerClientInterceptor
- extends RemoteInvocationBasedAccessor
- implements org.aopalliance.intercept.MethodInterceptor, HttpInvokerClientConfiguration
Interceptor for accessing an HTTP invoker service.
The service URL must be an HTTP URL exposing an HTTP invoker service.
Simply serializes remote invocation objects and deserializes remote
invocation results. Uses Java serialization just like RMI, but provides
the same ease of setup as Caucho's HTTP-based Hessian and Burlap protocols.
- Since:
- 1.1
- Author:
- Juergen Hoeller
- See Also:
UrlBasedRemoteAccessor.setServiceUrl(java.lang.String)
,
HttpInvokerServiceExporter
,
HttpInvokerProxyFactoryBean
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HttpInvokerClientInterceptor
public HttpInvokerClientInterceptor()
setHttpInvokerRequestExecutor
public void setHttpInvokerRequestExecutor(HttpInvokerRequestExecutor httpInvokerRequestExecutor)
getHttpInvokerRequestExecutor
public HttpInvokerRequestExecutor getHttpInvokerRequestExecutor()
invoke
public java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation methodInvocation)
throws java.lang.Throwable
- Specified by:
invoke
in interface org.aopalliance.intercept.MethodInterceptor
- Throws:
java.lang.Throwable
executeRequest
protected RemoteInvocationResult executeRequest(RemoteInvocation invocation)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Execute the given remote invocation via the HttpInvokerRequestExecutor.
Can be overridden in subclasses to pass a different configuration object
to the executor. Alternatively, add further configuration properties in a
subclass of this accessor: By default, the accessor passed itself as
configuration object to the executor.
- Parameters:
invocation
- the RemoteInvocation to execute
- Returns:
- the RemoteInvocationResult object
- Throws:
java.io.IOException
- if thrown by I/O operations
java.lang.ClassNotFoundException
- if thrown during deserialization- See Also:
getHttpInvokerRequestExecutor()
,
HttpInvokerClientConfiguration
recreateRemoteInvocationResult
protected java.lang.Object recreateRemoteInvocationResult(RemoteInvocationResult result)
throws java.lang.Throwable
- Recreate the invocation result contained in the given RemoteInvocationResult
object. The default implementation calls the default recreate method.
Can be overridden in subclass to provide custom recreation, potentially
processing the returned result object.
- Parameters:
result
- the RemoteInvocationResult to recreate
- Returns:
- a return value if the invocation result is a successful return
- Throws:
java.lang.Throwable
- if the invocation result is an exception- See Also:
RemoteInvocationResult.recreate()
Copyright (C) 2003-2004 The Spring Framework Project.