| java.lang.Object org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor
All known Subclasses: org.springframework.remoting.httpinvoker.CommonsHttpInvokerRequestExecutor, org.springframework.remoting.httpinvoker.SimpleHttpInvokerRequestExecutor,
Method Summary | |
protected ObjectInputStream | createObjectInputStream(InputStream is, String codebaseUrl) Create an ObjectInputStream for the given InputStream and codebase. | protected InputStream | decorateInputStream(InputStream is) Return the InputStream to use for reading remote invocation results,
potentially decorating the given original InputStream. | protected OutputStream | decorateOutputStream(OutputStream os) Return the OutputStream to use for writing remote invocations,
potentially decorating the given original OutputStream. | abstract protected RemoteInvocationResult | doExecuteRequest(HttpInvokerClientConfiguration config, ByteArrayOutputStream baos) Execute a request to send the given serialized remote invocation. | protected RemoteInvocationResult | doReadRemoteInvocationResult(ObjectInputStream ois) Perform the actual reading of an invocation object from the
given ObjectInputStream. | protected void | doWriteRemoteInvocation(RemoteInvocation invocation, ObjectOutputStream oos) Perform the actual writing of the given invocation object to the
given ObjectOutputStream. | final public RemoteInvocationResult | executeRequest(HttpInvokerClientConfiguration config, RemoteInvocation invocation) | protected ClassLoader | getBeanClassLoader() Return the bean ClassLoader that this executor is supposed to use. | protected ByteArrayOutputStream | getByteArrayOutputStream(RemoteInvocation invocation) Serialize the given RemoteInvocation into a ByteArrayOutputStream. | public String | getContentType() Return the content type to use for sending HTTP invoker requests. | public boolean | isAcceptGzipEncoding() Return whether to accept GZIP encoding, that is, whether to
send the HTTP "Accept-Encoding" header with "gzip" as value. | protected RemoteInvocationResult | readRemoteInvocationResult(InputStream is, String codebaseUrl) Deserialize a RemoteInvocationResult object from the given InputStream.
Gives decorateInputStream a chance to decorate the stream
first (for example, for custom encryption or compression). | public void | setAcceptGzipEncoding(boolean acceptGzipEncoding) Set whether to accept GZIP encoding, that is, whether to
send the HTTP "Accept-Encoding" header with "gzip" as value.
Default is "true". | public void | setBeanClassLoader(ClassLoader classLoader) | public void | setContentType(String contentType) Specify the content type to use for sending HTTP invoker requests. | protected void | writeRemoteInvocation(RemoteInvocation invocation, OutputStream os) Serialize the given RemoteInvocation to the given OutputStream. |
CONTENT_TYPE_SERIALIZED_OBJECT | final public static String CONTENT_TYPE_SERIALIZED_OBJECT(Code) | | Default content type: "application/x-java-serialized-object"
|
ENCODING_GZIP | final protected static String ENCODING_GZIP(Code) | | |
HTTP_HEADER_ACCEPT_ENCODING | final protected static String HTTP_HEADER_ACCEPT_ENCODING(Code) | | |
HTTP_HEADER_CONTENT_ENCODING | final protected static String HTTP_HEADER_CONTENT_ENCODING(Code) | | |
HTTP_HEADER_CONTENT_LENGTH | final protected static String HTTP_HEADER_CONTENT_LENGTH(Code) | | |
HTTP_HEADER_CONTENT_TYPE | final protected static String HTTP_HEADER_CONTENT_TYPE(Code) | | |
HTTP_METHOD_POST | final protected static String HTTP_METHOD_POST(Code) | | |
logger | final protected Log logger(Code) | | |
decorateInputStream | protected InputStream decorateInputStream(InputStream is) throws IOException(Code) | | Return the InputStream to use for reading remote invocation results,
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.
Parameters: is - the original InputStream the potentially decorated InputStream |
decorateOutputStream | protected OutputStream decorateOutputStream(OutputStream os) throws IOException(Code) | | Return the OutputStream to use for writing remote invocations,
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.
Parameters: os - the original OutputStream the potentially decorated OutputStream |
doWriteRemoteInvocation | protected void doWriteRemoteInvocation(RemoteInvocation invocation, ObjectOutputStream oos) throws IOException(Code) | | Perform the actual writing of the given invocation object to the
given ObjectOutputStream.
The default implementation simply calls writeObject .
Can be overridden for serialization of a custom wrapper object rather
than the plain invocation, for example an encryption-aware holder.
Parameters: invocation - the RemoteInvocation object Parameters: oos - the ObjectOutputStream to write to throws: IOException - if thrown by I/O methods See Also: java.io.ObjectOutputStream.writeObject |
getBeanClassLoader | protected ClassLoader getBeanClassLoader()(Code) | | Return the bean ClassLoader that this executor is supposed to use.
|
getByteArrayOutputStream | protected ByteArrayOutputStream getByteArrayOutputStream(RemoteInvocation invocation) throws IOException(Code) | | Serialize the given RemoteInvocation into a ByteArrayOutputStream.
Parameters: invocation - the RemoteInvocation object a ByteArrayOutputStream with the serialized RemoteInvocation throws: IOException - if thrown by I/O methods |
getContentType | public String getContentType()(Code) | | Return the content type to use for sending HTTP invoker requests.
|
isAcceptGzipEncoding | public boolean isAcceptGzipEncoding()(Code) | | Return whether to accept GZIP encoding, that is, whether to
send the HTTP "Accept-Encoding" header with "gzip" as value.
|
setAcceptGzipEncoding | public void setAcceptGzipEncoding(boolean acceptGzipEncoding)(Code) | | Set whether to accept GZIP encoding, that is, whether to
send the HTTP "Accept-Encoding" header with "gzip" as value.
Default is "true". Turn this flag off if you do not want
GZIP response compression even if enabled on the HTTP server.
|
setContentType | public void setContentType(String contentType)(Code) | | Specify the content type to use for sending HTTP invoker requests.
Default is "application/x-java-serialized-object".
|
|
|