|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor
Abstract base implementation of the HttpInvokerRequestExecutor interface.
Preimplements serialization of RemoteInvocation objects and deserialization of RemoteInvocationResults objects.
doExecuteRequest(org.springframework.remoting.httpinvoker.HttpInvokerClientConfiguration, java.io.ByteArrayOutputStream)| Field Summary | |
protected static String |
CONTENT_TYPE_SERIALIZED_OBJECT
|
protected static String |
HTTP_HEADER_CONTENT_LENGTH
|
protected static String |
HTTP_HEADER_CONTENT_TYPE
|
protected static String |
HTTP_METHOD_POST
|
protected Log |
logger
|
| Constructor Summary | |
AbstractHttpInvokerRequestExecutor()
|
|
| Method Summary | |
protected abstract RemoteInvocationResult |
doExecuteRequest(HttpInvokerClientConfiguration config,
ByteArrayOutputStream baos)
Execute a request to send the given serialized remote invocation. |
RemoteInvocationResult |
executeRequest(HttpInvokerClientConfiguration config,
RemoteInvocation invocation)
Execute a request to send the given remote invocation. |
protected ByteArrayOutputStream |
getByteArrayOutputStream(RemoteInvocation invocation)
Serialize the given RemoteInvocation into a ByteArrayOutputStream. |
protected RemoteInvocationResult |
readRemoteInvocationResult(InputStream is)
Deserialize a RemoteInvocationResult from the given InputStream. |
protected void |
writeRemoteInvocation(RemoteInvocation invocation,
OutputStream os)
Serialize the given RemoteInvocation to the given OutputStream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final String CONTENT_TYPE_SERIALIZED_OBJECT
protected static final String HTTP_HEADER_CONTENT_TYPE
protected static final String HTTP_HEADER_CONTENT_LENGTH
protected static final String HTTP_METHOD_POST
protected final Log logger
| Constructor Detail |
public AbstractHttpInvokerRequestExecutor()
| Method Detail |
public final RemoteInvocationResult executeRequest(HttpInvokerClientConfiguration config,
RemoteInvocation invocation)
throws IOException,
ClassNotFoundException
HttpInvokerRequestExecutor
executeRequest in interface HttpInvokerRequestExecutorconfig - the HTTP invoker configuration that specifies the
target serviceinvocation - the RemoteInvocation to execute
IOException - if thrown by I/O operations
ClassNotFoundException - if thrown during deserialization
protected ByteArrayOutputStream getByteArrayOutputStream(RemoteInvocation invocation)
throws IOException
invocation - the RemoteInvocation object
IOException - if thrown by I/O methods
protected void writeRemoteInvocation(RemoteInvocation invocation,
OutputStream os)
throws IOException
invocation - the RemoteInvocation objectos - the OutputStream to write to
IOException - if thrown by I/O methods
protected abstract RemoteInvocationResult doExecuteRequest(HttpInvokerClientConfiguration config,
ByteArrayOutputStream baos)
throws IOException,
ClassNotFoundException
Implementations will usually call readRemoteInvocationResult to deserialize a returned RemoteInvocationResult object.
config - the HTTP invoker configuration that specifies the
target servicebaos - the ByteArrayOutputStream that contains the serialized
RemoteInvocation object
IOException - if thrown by I/O operations
ClassNotFoundException - if thrown during deserializationreadRemoteInvocationResult(java.io.InputStream)
protected RemoteInvocationResult readRemoteInvocationResult(InputStream is)
throws IOException,
ClassNotFoundException
is - the InputStream to read from
IOException - if thrown by I/O methods
ClassNotFoundException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||