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:
- Advice, HttpInvokerClientConfiguration, Interceptor, MethodInterceptor
- Direct Known Subclasses:
- HttpInvokerProxyFactoryBean
- public class HttpInvokerClientInterceptor
- extends RemoteInvocationBasedAccessor
- implements 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)
- Set the HttpInvokerRequestExecutor implementation to use for executing
remote invocations. Default is SimpleHttpInvokerRequestExecutor.
Alternatively, consider CommonsHttpInvokerRequestExecutor for more
sophisticated needs.
- See Also:
SimpleHttpInvokerRequestExecutor
,
CommonsHttpInvokerRequestExecutor
getHttpInvokerRequestExecutor
public HttpInvokerRequestExecutor getHttpInvokerRequestExecutor()
- Return the HttpInvokerRequestExecutor used by this remote accessor.
invoke
public Object invoke(MethodInvocation methodInvocation)
throws Throwable
- Specified by:
invoke
in interface MethodInterceptor
- Throws:
Throwable
executeRequest
protected RemoteInvocationResult executeRequest(RemoteInvocation invocation)
throws IOException,
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:
IOException
- if thrown by I/O operations
ClassNotFoundException
- if thrown during deserialization- See Also:
getHttpInvokerRequestExecutor()
,
HttpInvokerClientConfiguration
Copyright (C) 2003-2004 The Spring Framework Project.