public class AuthenticationSimpleHttpInvokerRequestExecutor extends 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(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(HttpURLConnection con,
int contentLength)
Called every time a HTTP invocation is made.
|
doExecuteRequest, isGzipResponse, openConnection, readResponseBody, setConnectTimeout, setReadTimeout, validateResponse, writeRequestBodycreateObjectInputStream, decorateInputStream, decorateOutputStream, doReadRemoteInvocationResult, doWriteRemoteInvocation, executeRequest, getBeanClassLoader, getByteArrayOutputStream, getContentType, isAcceptGzipEncoding, readRemoteInvocationResult, setAcceptGzipEncoding, setBeanClassLoader, setContentType, writeRemoteInvocationpublic AuthenticationSimpleHttpInvokerRequestExecutor()
protected void doPrepareConnection(HttpURLConnection con, int contentLength) throws IOException
con - the HTTP connection to preparecontentLength - the length of the content to sendIOException - if thrown by HttpURLConnection methodsprotected void prepareConnection(HttpURLConnection con, int contentLength) throws 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 SimpleHttpInvokerRequestExecutorcon - the HTTP connection to preparecontentLength - the length of the content to sendIOException - if thrown by HttpURLConnection methods