Package nl.vpro.io.prepr
Class PreprRepositoryClient
- java.lang.Object
-
- nl.vpro.io.prepr.PreprRepositoryClient
-
- All Implemented Interfaces:
PreprRepositoryClientMXBean
@Named public class PreprRepositoryClient extends Object implements PreprRepositoryClientMXBean
- Since:
- 0.1
- Author:
- Michiel Meeuwissen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PreprRepositoryClient.Builder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T> T
_get(com.google.api.client.http.GenericUrl url, Class<T> clazz)
protected void
addListParameters(com.google.api.client.http.GenericUrl url, Paging paging)
protected void
authenticate(com.google.api.client.http.HttpRequest request)
protected void
consumeGraphrlHeaders(com.google.api.client.http.HttpResponse response)
protected com.google.api.client.http.HttpResponse
delete(com.google.api.client.http.GenericUrl url)
protected com.google.api.client.http.HttpResponse
execute(com.google.api.client.http.HttpRequest httpRequest)
protected com.google.api.client.http.HttpResponse
get(com.google.api.client.http.GenericUrl url)
protected <T> T
get(com.google.api.client.http.GenericUrl url, Class<T> clazz)
String
getConnectTimeoutForGetAsString()
String
getExpirationAsString()
String
getReadTimeoutForGetAsString()
String
getRefreshesAfterAsString()
String
getScopesAsString()
protected void
getToken()
protected <T> Optional<T>
optionalGet(com.google.api.client.http.GenericUrl url, Class<T> clazz)
protected com.google.api.client.http.HttpResponse
post(com.google.api.client.http.GenericUrl url, Map<String,Object> form)
protected <T> T
post(com.google.api.client.http.GenericUrl url, Map<String,Object> map, Class<T> clazz)
protected com.google.api.client.http.HttpResponse
put(com.google.api.client.http.GenericUrl url, Object o)
void
registerBean(String jmxName)
void
setConnectTimeoutForGetAsString(String connectTimeoutForGetAsString)
void
setReadTimeoutForGetAsString(String readTimeoutForGetAsString)
void
setScopes(List<Scope> scopes)
String
toString()
protected String
toString(Object o)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface nl.vpro.io.prepr.PreprRepositoryClientMXBean
getAuthenticationCount, getCallCount, getDescription, getGuideCallsMaxDays, getRateLimitHourLimit, getRateLimitHourRemaining, getRateLimitReset, setGuideCallsMaxDays
-
-
-
-
Method Detail
-
registerBean
public void registerBean(String jmxName)
-
addListParameters
protected void addListParameters(com.google.api.client.http.GenericUrl url, Paging paging)
-
_get
protected <T> T _get(com.google.api.client.http.GenericUrl url, Class<T> clazz) throws IOException
- Throws:
IOException
-
optionalGet
protected <T> Optional<T> optionalGet(com.google.api.client.http.GenericUrl url, Class<T> clazz)
-
get
protected <T> T get(com.google.api.client.http.GenericUrl url, Class<T> clazz)
-
consumeGraphrlHeaders
protected void consumeGraphrlHeaders(com.google.api.client.http.HttpResponse response)
-
get
protected com.google.api.client.http.HttpResponse get(com.google.api.client.http.GenericUrl url) throws IOException
- Throws:
IOException
-
delete
protected com.google.api.client.http.HttpResponse delete(com.google.api.client.http.GenericUrl url)
-
put
protected com.google.api.client.http.HttpResponse put(com.google.api.client.http.GenericUrl url, Object o)
-
post
protected com.google.api.client.http.HttpResponse post(com.google.api.client.http.GenericUrl url, Map<String,Object> form)
-
post
protected <T> T post(com.google.api.client.http.GenericUrl url, Map<String,Object> map, Class<T> clazz)
-
execute
protected com.google.api.client.http.HttpResponse execute(com.google.api.client.http.HttpRequest httpRequest) throws IOException
- Throws:
IOException
-
authenticate
protected void authenticate(com.google.api.client.http.HttpRequest request) throws IOException
- Throws:
IOException
-
getToken
protected void getToken() throws IOException
- Throws:
IOException
-
getScopesAsString
public String getScopesAsString()
- Specified by:
getScopesAsString
in interfacePreprRepositoryClientMXBean
-
getExpirationAsString
public String getExpirationAsString()
- Specified by:
getExpirationAsString
in interfacePreprRepositoryClientMXBean
-
getRefreshesAfterAsString
public String getRefreshesAfterAsString()
- Specified by:
getRefreshesAfterAsString
in interfacePreprRepositoryClientMXBean
-
getConnectTimeoutForGetAsString
public String getConnectTimeoutForGetAsString()
- Specified by:
getConnectTimeoutForGetAsString
in interfacePreprRepositoryClientMXBean
-
setConnectTimeoutForGetAsString
public void setConnectTimeoutForGetAsString(String connectTimeoutForGetAsString)
- Specified by:
setConnectTimeoutForGetAsString
in interfacePreprRepositoryClientMXBean
-
getReadTimeoutForGetAsString
public String getReadTimeoutForGetAsString()
- Specified by:
getReadTimeoutForGetAsString
in interfacePreprRepositoryClientMXBean
-
setReadTimeoutForGetAsString
public void setReadTimeoutForGetAsString(String readTimeoutForGetAsString)
- Specified by:
setReadTimeoutForGetAsString
in interfacePreprRepositoryClientMXBean
-
-