|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor org.springframework.remoting.httpinvoker.CommonsHttpInvokerRequestExecutor
HttpInvokerRequestExecutor implementation that uses Jakarta Commons HttpClient to execute POST requests.
Allows to use a preconfigured HttpClient instance, potentially with authentication, HTTP connection pooling, etc.
SimpleHttpInvokerRequestExecutor
Field Summary |
Fields inherited from class org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor |
CONTENT_TYPE_SERIALIZED_OBJECT, HTTP_HEADER_CONTENT_LENGTH, HTTP_HEADER_CONTENT_TYPE, HTTP_METHOD_POST, logger |
Constructor Summary | |
CommonsHttpInvokerRequestExecutor()
Create a new CommonsHttpInvokerRequestExecutor with a default HttpClient that uses a default MultiThreadedHttpConnectionManager. |
|
CommonsHttpInvokerRequestExecutor(HttpClient httpClient)
Create a new CommonsHttpInvokerRequestExecutor with the given HttpClient instance. |
Method Summary | |
protected PostMethod |
createPostMethod(HttpInvokerClientConfiguration config)
Create a PostMethod for the given configuration. |
protected RemoteInvocationResult |
doExecuteRequest(HttpInvokerClientConfiguration config,
ByteArrayOutputStream baos)
Execute a request to send the given serialized remote invocation. |
protected void |
executePostMethod(HttpInvokerClientConfiguration config,
HttpClient httpClient,
PostMethod postMethod)
Execute the given PostMethod instance. |
HttpClient |
getHttpClient()
Return the HttpClient instance that this request executor uses. |
void |
setHttpClient(HttpClient httpClient)
Set the HttpClient instance to use for this request executor. |
Methods inherited from class org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor |
createObjectInputStream, decorateInputStream, decorateOutputStream, doReadRemoteInvocationResult, doWriteRemoteInvocation, executeRequest, getByteArrayOutputStream, readRemoteInvocationResult, readRemoteInvocationResult, writeRemoteInvocation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CommonsHttpInvokerRequestExecutor()
HttpClient
,
MultiThreadedHttpConnectionManager
public CommonsHttpInvokerRequestExecutor(HttpClient httpClient)
httpClient
- the HttpClient instance to use for this request executorMethod Detail |
public void setHttpClient(HttpClient httpClient)
public HttpClient getHttpClient()
protected RemoteInvocationResult doExecuteRequest(HttpInvokerClientConfiguration config, ByteArrayOutputStream baos) throws IOException, ClassNotFoundException
AbstractHttpInvokerRequestExecutor
Implementations will usually call readRemoteInvocationResult
to deserialize a returned RemoteInvocationResult object.
doExecuteRequest
in class AbstractHttpInvokerRequestExecutor
config
- the HTTP invoker configuration that specifies the
target servicebaos
- the ByteArrayOutputStream that contains the serialized
RemoteInvocation object
ClassNotFoundException
- if thrown during deserialization
IOException
- if thrown by I/O operationsAbstractHttpInvokerRequestExecutor.readRemoteInvocationResult(java.io.InputStream, String)
protected PostMethod createPostMethod(HttpInvokerClientConfiguration config) throws IOException
config
- the HTTP invoker configuration that specifies the
target service
IOException
- if thrown by I/O methodsprotected void executePostMethod(HttpInvokerClientConfiguration config, HttpClient httpClient, PostMethod postMethod) throws IOException
config
- the HTTP invoker configuration that specifies the
target servicehttpClient
- the HttpClient to execute onpostMethod
- the PostMethod to execute
IOException
- if thrown by I/O methods
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |