public class GoogleHttpClient extends Object implements OctaneHttpClient
This will be refactored in future releases to enable the use of different underlying APIs
| Modifier and Type | Field and Description |
|---|---|
protected Date |
lastSuccessfulAuthTimestamp |
protected Authentication |
lastUsedAuthentication |
protected String |
lwssoValue |
protected String |
octaneUserValue |
protected com.google.api.client.http.HttpRequestFactory |
requestFactory |
protected com.google.api.client.http.HttpRequestInitializer |
requestInitializer
Request initializer called on every request made by the requestFactory
|
protected String |
urlDomain |
LWSSO_COOKIE_KEY, OAUTH_AUTH_URL, OAUTH_SIGNOUT_URL, OCTANE_USER_COOKIE_KEY| Constructor and Description |
|---|
GoogleHttpClient(String urlDomain,
Authentication authentication) |
GoogleHttpClient(String urlDomain,
Authentication authentication,
Octane.OctaneCustomSettings settings)
Constructor accepting custom settings for the underlying http transport layer
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
authenticate()
Authenticate with the Octane server using an implementation of the
JSONAuthentication class. |
protected OctaneHttpResponse |
convertHttpResponseToOctaneHttpResponse(com.google.api.client.http.HttpResponse httpResponse)
Convert google implementation of
HttpResponse to an implementation abstract OctaneHttpResponse |
protected com.google.api.client.http.HttpRequest |
convertOctaneRequestToGoogleHttpRequest(OctaneHttpRequest octaneHttpRequest)
Convert the abstract
OctaneHttpRequestRequest object to a specific HttpRequest for the google http client |
OctaneHttpResponse |
execute(OctaneHttpRequest octaneHttpRequest) |
static int |
getHttpRequestRetryCount() |
void |
signOut()
Signs out and removes cookies
|
protected com.google.api.client.http.HttpRequestFactory requestFactory
protected String lwssoValue
protected String octaneUserValue
protected final String urlDomain
protected Authentication lastUsedAuthentication
protected Date lastSuccessfulAuthTimestamp
protected com.google.api.client.http.HttpRequestInitializer requestInitializer
public GoogleHttpClient(String urlDomain, Authentication authentication)
public GoogleHttpClient(String urlDomain, Authentication authentication, Octane.OctaneCustomSettings settings) throws RuntimeException
urlDomain - the Octane domainsettings - the object containing he custom settingsRuntimeException - in case of an underlying security exceptionpublic boolean authenticate()
OctaneHttpClientJSONAuthentication class.
If basic authentication is being used then the authentication is an inherent part of execute and therefore
authentication does not need to be called explicitly. True will be returned in this caseauthenticate in interface OctaneHttpClientpublic void signOut()
OctaneHttpClientsignOut in interface OctaneHttpClientprotected com.google.api.client.http.HttpRequest convertOctaneRequestToGoogleHttpRequest(OctaneHttpRequest octaneHttpRequest)
OctaneHttpRequestRequest object to a specific HttpRequest for the google http clientoctaneHttpRequest - input OctaneHttpRequestHttpRequestprotected OctaneHttpResponse convertHttpResponseToOctaneHttpResponse(com.google.api.client.http.HttpResponse httpResponse)
HttpResponse to an implementation abstract OctaneHttpResponsehttpResponse - implementation specific HttpResponseOctaneHttpResponse created from the impl response objectpublic OctaneHttpResponse execute(OctaneHttpRequest octaneHttpRequest)
execute in interface OctaneHttpClientpublic static int getHttpRequestRetryCount()
Copyright © 2021 Micro Focus. All rights reserved.