接口 HttpInvokerRequestExecutor
- 所有已知实现类:
AbstractHttpInvokerRequestExecutor
,HttpComponentsHttpInvokerRequestExecutor
,SimpleHttpInvokerRequestExecutor
public interface HttpInvokerRequestExecutor
Strategy interface for actual execution of an HTTP invoker request. Used by HttpInvokerClientInterceptor and its subclass HttpInvokerProxyFactoryBean.Two implementations are provided out of the box:
SimpleHttpInvokerRequestExecutor
: Uses JDK facilities to execute POST requests, without support for HTTP authentication or advanced configuration options.HttpComponentsHttpInvokerRequestExecutor
: Uses Apache's Commons HttpClient to execute POST requests, allowing to use a preconfigured HttpClient instance (potentially with authentication, HTTP connection pooling, etc).
- 从以下版本开始:
- 1.1
- 作者:
- Juergen Hoeller
- 另请参阅:
HttpInvokerClientInterceptor.setHttpInvokerRequestExecutor(org.springframework.remoting.httpinvoker.HttpInvokerRequestExecutor)
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 RemoteInvocationResult
executeRequest(HttpInvokerClientConfiguration config, RemoteInvocation invocation)
Execute a request to send the given remote invocation.
方法详细资料
executeRequest
RemoteInvocationResult executeRequest(HttpInvokerClientConfiguration config, RemoteInvocation invocation) throws Exception
Execute a request to send the given remote invocation.- 参数:
config
- the HTTP invoker configuration that specifies the target serviceinvocation
- the RemoteInvocation to execute- 返回:
- the RemoteInvocationResult object
- 抛出:
IOException
- if thrown by I/O operationsClassNotFoundException
- if thrown during deserializationException
- in case of general errors