Package co.arago.hiro.client.rest
Class AuthenticatedAPIHandler.APIRequestConf<T extends AuthenticatedAPIHandler.APIRequestConf<T,R>,R>
- java.lang.Object
-
- co.arago.hiro.client.rest.AuthenticatedAPIHandler.APIRequestConf<T,R>
-
- Type Parameters:
T- The Builder typeR- The type of the result expected fromexecute()
- Direct Known Subclasses:
AppAPI.GetApplicationCommand,AppAPI.GetConfigCommand,AppAPI.GetContentCommand,AppAPI.GetDesktopApplicationsCommand,AppAPI.GetManifestCommand,AuthAPI.GetMeAccountCommand,AuthAPI.GetMeAvatarCommand,AuthAPI.GetMeProfileCommand,AuthAPI.GetMeRolesCommand,AuthAPI.GetMeTeamsCommand,AuthenticatedAPIHandler.SendBodyAPIRequestConf,AuthenticatedAPIHandler.SendStreamAPIRequestConf,GraphAPI.DeleteEntityCommand,GraphAPI.GetBlobCommand,GraphAPI.GetEntityCommand,GraphAPI.GetHistoryCommand,GraphAPI.GetTimeseriesCommand,GraphAPI.GetTimeseriesHistoryCommand
- Enclosing class:
- AuthenticatedAPIHandler
public abstract static class AuthenticatedAPIHandler.APIRequestConf<T extends AuthenticatedAPIHandler.APIRequestConf<T,R>,R> extends java.lang.ObjectThe basic configuration for all requests. Handle queries, headers and fragments.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Stringfragmentprotected HttpHeaderMapheadersprotected java.lang.LonghttpRequestTimeoutprotected java.lang.IntegermaxRetriesprotected URIPathpathprotected URIEncodedDataquery
-
Constructor Summary
Constructors Constructor Description APIRequestConf(java.lang.String... pathParts)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Rexecute()protected abstract Tself()TsetHttpHeaders(HttpHeaderMap headers)TsetHttpRequestTimeout(java.lang.Long httpRequestTimeout)TsetMaxRetries(java.lang.Integer maxRetries)TsetUrlFragment(java.lang.String fragment)TsetUrlQuery(URIEncodedData query)
-
-
-
Field Detail
-
path
protected final URIPath path
-
query
protected final URIEncodedData query
-
headers
protected final HttpHeaderMap headers
-
fragment
protected java.lang.String fragment
-
httpRequestTimeout
protected java.lang.Long httpRequestTimeout
-
maxRetries
protected java.lang.Integer maxRetries
-
-
Method Detail
-
setUrlQuery
public T setUrlQuery(URIEncodedData query)
- Parameters:
query- Set query parameters.- Returns:
self()
-
setHttpHeaders
public T setHttpHeaders(HttpHeaderMap headers)
- Parameters:
headers- Set headers.- Returns:
self()
-
setUrlFragment
public T setUrlFragment(java.lang.String fragment)
- Parameters:
fragment- Set URL fragment (http://...#[fragment])- Returns:
self()
-
setHttpRequestTimeout
public T setHttpRequestTimeout(java.lang.Long httpRequestTimeout)
-
setMaxRetries
public T setMaxRetries(java.lang.Integer maxRetries)
-
execute
public abstract R execute() throws HiroException, java.io.IOException, java.lang.InterruptedException
- Throws:
HiroExceptionjava.io.IOExceptionjava.lang.InterruptedException
-
self
protected abstract T self()
-
-