java.lang.Object | |||||
↳ | org.springframework.remoting.support.RemotingSupport | ||||
↳ | org.springframework.remoting.support.RemoteExporter | ||||
↳ | org.springframework.remoting.support.RemoteInvocationBasedExporter | ||||
↳ | org.springframework.remoting.rmi.RemoteInvocationSerializingExporter | ||||
↳ | org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter |
Servlet-API-based HTTP request handler that exports the specified service bean as HTTP invoker service endpoint, accessible via an HTTP invoker proxy.
Note: Spring also provides an alternative version of this exporter,
for Sun's JRE 1.6 HTTP server: SimpleHttpInvokerServiceExporter
.
Deserializes remote invocation objects and serializes remote invocation result objects. Uses Java serialization just like RMI, but provides the same ease of setup as Caucho's HTTP-based Hessian and Burlap protocols.
HTTP invoker is the recommended protocol for Java-to-Java remoting. It is more powerful and more extensible than Hessian and Burlap, at the expense of being tied to Java. Nevertheless, it is as easy to set up as Hessian and Burlap, which is its main advantage compared to RMI.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.remoting.rmi.RemoteInvocationSerializingExporter
|
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.remoting.support.RemotingSupport
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Reads a remote invocation from the request, executes it,
and writes the remote invocation result to the response.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return the InputStream to use for reading remote invocations,
potentially decorating the given original InputStream.
| |||||||||||
Return the OutputStream to use for writing remote invocation results,
potentially decorating the given original OutputStream.
| |||||||||||
Read a RemoteInvocation from the given HTTP request.
| |||||||||||
Deserialize a RemoteInvocation object from the given InputStream.
| |||||||||||
Serialize the given RemoteInvocation to the given OutputStream.
| |||||||||||
Write the given RemoteInvocationResult to the given HTTP response.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.remoting.rmi.RemoteInvocationSerializingExporter
| |||||||||||
From class
org.springframework.remoting.support.RemoteInvocationBasedExporter
| |||||||||||
From class
org.springframework.remoting.support.RemoteExporter
| |||||||||||
From class
org.springframework.remoting.support.RemotingSupport
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.beans.factory.BeanClassLoaderAware
| |||||||||||
From interface
org.springframework.beans.factory.InitializingBean
| |||||||||||
From interface
org.springframework.web.HttpRequestHandler
|
Reads a remote invocation from the request, executes it, and writes the remote invocation result to the response.
request | current HTTP request |
---|---|
response | current HTTP response |
IOException | |
---|---|
ServletException |
Return the InputStream to use for reading remote invocations, potentially decorating the given original InputStream.
The default implementation returns the given stream as-is. Can be overridden, for example, for custom encryption or compression.
request | current HTTP request |
---|---|
is | the original InputStream |
IOException | in case of I/O failure |
---|
Return the OutputStream to use for writing remote invocation results, potentially decorating the given original OutputStream.
The default implementation returns the given stream as-is. Can be overridden, for example, for custom encryption or compression.
request | current HTTP request |
---|---|
response | current HTTP response |
os | the original OutputStream |
IOException | in case of I/O failure |
---|
Read a RemoteInvocation from the given HTTP request.
Delegates to
readRemoteInvocation(javax.servlet.http.HttpServletRequest, java.io.InputStream)
with the
servlet request's input stream
.
request | current HTTP request |
---|
IOException | in case of I/O failure |
---|---|
ClassNotFoundException | if thrown by deserialization |
Deserialize a RemoteInvocation object from the given InputStream.
Gives decorateInputStream(HttpServletRequest, InputStream)
a chance to decorate the stream
first (for example, for custom encryption or compression). Creates a
CodebaseAwareObjectInputStream
and calls doReadRemoteInvocation(ObjectInputStream)
to actually read the object.
Can be overridden for custom serialization of the invocation.
request | current HTTP request |
---|---|
is | the InputStream to read from |
IOException | in case of I/O failure |
---|---|
ClassNotFoundException | if thrown during deserialization |
Serialize the given RemoteInvocation to the given OutputStream.
The default implementation gives decorateOutputStream(HttpServletRequest, HttpServletResponse, OutputStream)
a chance
to decorate the stream first (for example, for custom encryption or compression).
Creates an ObjectOutputStream
for the final stream and calls
doWriteRemoteInvocationResult(RemoteInvocationResult, ObjectOutputStream)
to actually write the object.
Can be overridden for custom serialization of the invocation.
request | current HTTP request |
---|---|
response | current HTTP response |
result | the RemoteInvocationResult object |
os | the OutputStream to write to |
IOException | in case of I/O failure |
---|
Write the given RemoteInvocationResult to the given HTTP response.
request | current HTTP request |
---|---|
response | current HTTP response |
result | the RemoteInvocationResult object |
IOException | in case of I/O failure |
---|