@FunctionalInterface
public interface HttpInvokerRequestExecutor
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).
HttpInvokerClientInterceptor.setHttpInvokerRequestExecutor(org.springframework.remoting.httpinvoker.HttpInvokerRequestExecutor)
Modifier and Type | Method and Description |
---|---|
RemoteInvocationResult |
executeRequest(HttpInvokerClientConfiguration config,
RemoteInvocation invocation)
Execute a request to send the given remote invocation.
|
RemoteInvocationResult executeRequest(HttpInvokerClientConfiguration config, RemoteInvocation invocation) throws java.lang.Exception
config
- the HTTP invoker configuration that specifies the
target serviceinvocation
- the RemoteInvocation to executejava.io.IOException
- if thrown by I/O operationsjava.lang.ClassNotFoundException
- if thrown during deserializationjava.lang.Exception
- in case of general errors