Class AbstractOAuth2HttpClientFactory
java.lang.Object
org.apache.olingo.client.core.http.AbstractHttpClientFactory
org.apache.olingo.client.core.http.AbstractOAuth2HttpClientFactory
- All Implemented Interfaces:
HttpClientFactory,WrappingHttpClientFactory
public abstract class AbstractOAuth2HttpClientFactory
extends AbstractHttpClientFactory
implements WrappingHttpClientFactory
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.http.client.methods.HttpUriRequestprotected final URIprotected final URIprotected final DefaultHttpClientFactoryFields inherited from class org.apache.olingo.client.core.http.AbstractHttpClientFactory
USER_AGENT -
Constructor Summary
ConstructorsConstructorDescriptionAbstractOAuth2HttpClientFactory(URI oauth2GrantServiceURI, URI oauth2TokenServiceURI) AbstractOAuth2HttpClientFactory(DefaultHttpClientFactory wrapped, URI oauth2GrantServiceURI, URI oauth2TokenServiceURI) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidaccessToken(org.apache.http.impl.client.DefaultHttpClient client) Deprecated.Use the method accessToken(HttpClientBuilder client)protected voidaccessToken(org.apache.http.impl.client.HttpClientBuilder clientBuilder) voidclose(org.apache.http.client.HttpClient httpClient) org.apache.http.client.HttpClientcreate(HttpMethod method, URI uri) protected abstract voidinit()protected abstract booleanisInited()protected abstract voidrefreshToken(org.apache.http.impl.client.DefaultHttpClient client) Deprecated.Use the method refreshToken(HttpClientBuilder client)protected voidrefreshToken(org.apache.http.impl.client.HttpClientBuilder client)
-
Field Details
-
wrapped
-
oauth2GrantServiceURI
-
oauth2TokenServiceURI
-
currentRequest
protected org.apache.http.client.methods.HttpUriRequest currentRequest
-
-
Constructor Details
-
AbstractOAuth2HttpClientFactory
-
AbstractOAuth2HttpClientFactory
public AbstractOAuth2HttpClientFactory(DefaultHttpClientFactory wrapped, URI oauth2GrantServiceURI, URI oauth2TokenServiceURI)
-
-
Method Details
-
getWrappedHttpClientFactory
- Specified by:
getWrappedHttpClientFactoryin interfaceWrappingHttpClientFactory
-
isInited
- Throws:
OAuth2Exception
-
init
- Throws:
OAuth2Exception
-
accessToken
protected void accessToken(org.apache.http.impl.client.HttpClientBuilder clientBuilder) throws OAuth2Exception - Throws:
OAuth2Exception
-
refreshToken
protected void refreshToken(org.apache.http.impl.client.HttpClientBuilder client) throws OAuth2Exception - Throws:
OAuth2Exception
-
accessToken
@Deprecated protected abstract void accessToken(org.apache.http.impl.client.DefaultHttpClient client) throws OAuth2Exception Deprecated.Use the method accessToken(HttpClientBuilder client)- Parameters:
client-- Throws:
OAuth2Exception
-
refreshToken
@Deprecated protected abstract void refreshToken(org.apache.http.impl.client.DefaultHttpClient client) throws OAuth2Exception Deprecated.Use the method refreshToken(HttpClientBuilder client)- Parameters:
client-- Throws:
OAuth2Exception
-
create
- Specified by:
createin interfaceHttpClientFactory
-
close
public void close(org.apache.http.client.HttpClient httpClient) - Specified by:
closein interfaceHttpClientFactory
-