org.springframework.remoting.httpinvoker
Class SimpleHttpInvokerRequestExecutor
java.lang.Object
org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor
org.springframework.remoting.httpinvoker.SimpleHttpInvokerRequestExecutor
- All Implemented Interfaces:
- HttpInvokerRequestExecutor
public class SimpleHttpInvokerRequestExecutor
- extends AbstractHttpInvokerRequestExecutor
HttpInvokerRequestExecutor implementation that uses J2SE facilities
to execute POST requests, without support for HTTP authentication
or advanced configuration options.
Consider CommonsHttpInvokerRequestExecutor for more sophisticated needs.
- Since:
- 1.1
- Author:
- Juergen Hoeller
- See Also:
CommonsHttpInvokerRequestExecutor
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleHttpInvokerRequestExecutor
public SimpleHttpInvokerRequestExecutor()
doExecuteRequest
protected RemoteInvocationResult doExecuteRequest(HttpInvokerClientConfiguration config,
ByteArrayOutputStream baos)
throws IOException,
ClassNotFoundException
- Description copied from class:
AbstractHttpInvokerRequestExecutor
- Execute a request to send the given serialized remote invocation.
Implementations will usually call readRemoteInvocationResult
to deserialize a returned RemoteInvocationResult object.
- Specified by:
doExecuteRequest
in class AbstractHttpInvokerRequestExecutor
- Parameters:
config
- the HTTP invoker configuration that specifies the
target servicebaos
- the ByteArrayOutputStream that contains the serialized
RemoteInvocation object
- Returns:
- the RemoteInvocationResult object
- Throws:
IOException
- if thrown by I/O operations
ClassNotFoundException
- if thrown during deserialization- See Also:
AbstractHttpInvokerRequestExecutor.readRemoteInvocationResult(java.io.InputStream, String)
prepareConnection
protected void prepareConnection(HttpURLConnection con,
int contentLength)
throws IOException
- Prepare the given HTTP connection.
Default implementation specifies POST as method,
"application/x-java-serialized-object" as "Content-Type" header,
and the given content length as "Content-Length" header.
- Parameters:
con
- the HTTP connection to preparecontentLength
- the length of the content to send
- Throws:
IOException
- if thrown by HttpURLConnection methods
Copyright (c) 2002-2005 The Spring Framework Project.