Package co.arago.hiro.client.rest
Class AuthenticatedAPIHandler.Conf<T extends AuthenticatedAPIHandler.Conf<T>>
- java.lang.Object
-
- co.arago.hiro.client.rest.AuthenticatedAPIHandler.Conf<T>
-
- Direct Known Subclasses:
AppAPI.Conf,AuthAPI.Conf,GraphAPI.Conf
- Enclosing class:
- AuthenticatedAPIHandler
public abstract static class AuthenticatedAPIHandler.Conf<T extends AuthenticatedAPIHandler.Conf<T>> extends java.lang.ObjectConfiguration interface for all the parameters of an AuthenticatedAPIHandler. Builder need to implement this.
-
-
Constructor Summary
Constructors Constructor Description Conf()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract AuthenticatedAPIHandlerbuild()java.lang.StringgetApiName()java.lang.StringgetApiPath()java.lang.LonggetHttpRequestTimeout()intgetMaxRetries()TokenAPIHandlergetTokenApiHandler()protected abstract Tself()TsetApiName(java.lang.String apiName)TsetApiPath(java.lang.String apiPath)TsetHttpRequestTimeout(java.lang.Long httpRequestTimeout)TsetMaxRetries(int maxRetries)TsetTokenApiHandler(TokenAPIHandler tokenAPIHandler)
-
-
-
Method Detail
-
getApiName
public java.lang.String getApiName()
-
setApiName
public T setApiName(java.lang.String apiName)
- Parameters:
apiName- Set the name of the api. This name will be used to determine the API endpoint entry via /api/version.- Returns:
self()
-
getApiPath
public java.lang.String getApiPath()
-
setApiPath
public T setApiPath(java.lang.String apiPath)
- Parameters:
apiPath- Set a custom API path directly, omitting automatic endpoint detection via apiName.- Returns:
self()
-
getHttpRequestTimeout
public java.lang.Long getHttpRequestTimeout()
-
setHttpRequestTimeout
public T setHttpRequestTimeout(java.lang.Long httpRequestTimeout)
- Parameters:
httpRequestTimeout- Request timeout in ms.- Returns:
self()
-
getMaxRetries
public int getMaxRetries()
-
setMaxRetries
public T setMaxRetries(int maxRetries)
- Parameters:
maxRetries- Max amount of retries when http errors are received.- Returns:
self()
-
getTokenApiHandler
public TokenAPIHandler getTokenApiHandler()
-
setTokenApiHandler
public T setTokenApiHandler(TokenAPIHandler tokenAPIHandler)
- Parameters:
tokenAPIHandler- The tokenAPIHandler for this API.- Returns:
self()
-
self
protected abstract T self()
-
build
public abstract AuthenticatedAPIHandler build()
-
-