|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.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(org.apache.commons.httpclient.HttpClient httpClient)
Create a new CommonsHttpInvokerRequestExecutor with the given HttpClient instance. |
|
| Method Summary | |
protected org.apache.commons.httpclient.methods.PostMethod |
createPostMethod(HttpInvokerClientConfiguration config)
Create a PostMethod for the given configuration. |
protected RemoteInvocationResult |
doExecuteRequest(HttpInvokerClientConfiguration config,
java.io.ByteArrayOutputStream baos)
Execute a request to send the given serialized remote invocation. |
protected void |
executePostMethod(HttpInvokerClientConfiguration config,
org.apache.commons.httpclient.HttpClient httpClient,
org.apache.commons.httpclient.methods.PostMethod postMethod)
Execute the given PostMethod instance. |
org.apache.commons.httpclient.HttpClient |
getHttpClient()
Return the HttpClient instance that this request executor uses. |
void |
setHttpClient(org.apache.commons.httpclient.HttpClient httpClient)
Set the HttpClient instance to use for this request executor. |
| Methods inherited from class org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor |
executeRequest, getByteArrayOutputStream, 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,
MultiThreadedHttpConnectionManagerpublic CommonsHttpInvokerRequestExecutor(org.apache.commons.httpclient.HttpClient httpClient)
httpClient - the HttpClient instance to use for this request executor| Method Detail |
public void setHttpClient(org.apache.commons.httpclient.HttpClient httpClient)
public org.apache.commons.httpclient.HttpClient getHttpClient()
protected RemoteInvocationResult doExecuteRequest(HttpInvokerClientConfiguration config,
java.io.ByteArrayOutputStream baos)
throws java.io.IOException,
java.lang.ClassNotFoundException
AbstractHttpInvokerRequestExecutorImplementations will usually call readRemoteInvocationResult to deserialize a returned RemoteInvocationResult object.
doExecuteRequest in class AbstractHttpInvokerRequestExecutorconfig - the HTTP invoker configuration that specifies the
target servicebaos - the ByteArrayOutputStream that contains the serialized
RemoteInvocation object
java.lang.ClassNotFoundException - if thrown during deserialization
java.io.IOException - if thrown by I/O operationsAbstractHttpInvokerRequestExecutor.readRemoteInvocationResult(java.io.InputStream)
protected org.apache.commons.httpclient.methods.PostMethod createPostMethod(HttpInvokerClientConfiguration config)
throws java.io.IOException
config - the HTTP invoker configuration that specifies the
target service
java.io.IOException - if thrown by I/O methods
protected void executePostMethod(HttpInvokerClientConfiguration config,
org.apache.commons.httpclient.HttpClient httpClient,
org.apache.commons.httpclient.methods.PostMethod postMethod)
throws java.io.IOException
config - the HTTP invoker configuration that specifies the
target servicehttpClient - the HttpClient to execute onpostMethod - the PostMethod to execute
java.io.IOException - if thrown by I/O methods
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||