public class AuthenticationSimpleHttpInvokerRequestExecutor
extends org.springframework.remoting.httpinvoker.SimpleHttpInvokerRequestExecutor
SimpleHttpInvokerRequestExecutor
.CONTENT_TYPE_SERIALIZED_OBJECT, ENCODING_GZIP, HTTP_HEADER_ACCEPT_ENCODING, HTTP_HEADER_ACCEPT_LANGUAGE, HTTP_HEADER_CONTENT_ENCODING, HTTP_HEADER_CONTENT_LENGTH, HTTP_HEADER_CONTENT_TYPE, HTTP_METHOD_POST
Constructor and Description |
---|
AuthenticationSimpleHttpInvokerRequestExecutor() |
Modifier and Type | Method and Description |
---|---|
protected void |
doPrepareConnection(java.net.HttpURLConnection con,
int contentLength)
Provided so subclasses can perform additional configuration if required (eg set
additional request headers for non-security related information etc).
|
protected void |
prepareConnection(java.net.HttpURLConnection con,
int contentLength)
Called every time a HTTP invocation is made.
|
doExecuteRequest, isGzipResponse, openConnection, readResponseBody, setConnectTimeout, setReadTimeout, validateResponse, writeRequestBody
createObjectInputStream, decorateInputStream, decorateOutputStream, doReadRemoteInvocationResult, doWriteRemoteInvocation, executeRequest, getBeanClassLoader, getByteArrayOutputStream, getContentType, isAcceptGzipEncoding, readRemoteInvocationResult, setAcceptGzipEncoding, setBeanClassLoader, setContentType, writeRemoteInvocation
public AuthenticationSimpleHttpInvokerRequestExecutor()
protected void doPrepareConnection(java.net.HttpURLConnection con, int contentLength) throws java.io.IOException
con
- the HTTP connection to preparecontentLength
- the length of the content to sendjava.io.IOException
- if thrown by HttpURLConnection methodsprotected void prepareConnection(java.net.HttpURLConnection con, int contentLength) throws java.io.IOException
Simply allows the parent to setup the connection, and then adds an
Authorization
HTTP header property that will be used for BASIC
authentication.
The SecurityContextHolder
is used to obtain the relevant principal and
credentials.
prepareConnection
in class org.springframework.remoting.httpinvoker.SimpleHttpInvokerRequestExecutor
con
- the HTTP connection to preparecontentLength
- the length of the content to sendjava.io.IOException
- if thrown by HttpURLConnection methods