Class ClientBuilder
java.lang.Object
org.mineskin.ClientBuilder
-
Method Summary
Modifier and TypeMethodDescriptionSet the API keySet the base URL for the APIbuild()Build the MineSkinClientstatic ClientBuildercreate()Create a new ClientBuildergenerateExecutor(Executor generateExecutor) Set the Executor for generate requestsgenerateQueueOptions(QueueOptions queueOptions) Set the options for submitting queue jobs
defaults to 200ms interval and 1 concurrent requestgenerateRequestScheduler(ScheduledExecutorService scheduledExecutor) Deprecated.getExecutor(Executor getExecutor) Set the Executor for get requestsgetQueueOptions(QueueOptions queueOptions) Set the options for get requests, e.g. getting skins
defaults to 100ms interval and 5 concurrent requestsgetRequestScheduler(ScheduledExecutorService scheduledExecutor) Deprecated.usegetQueueOptions(QueueOptions)insteadgson(com.google.gson.Gson gson) Set the Gson instancejobCheckOptions(JobCheckOptions jobCheckOptions) Set the options for checking job status
defaults to 1000ms interval, 2000ms initial delay, and 10 max attemptsjobCheckScheduler(ScheduledExecutorService scheduledExecutor) Deprecated.usejobCheckOptions(JobCheckOptions)insteadrequestHandler(RequestHandlerConstructor requestHandlerConstructor) Set the constructor for the RequestHandlertimeout(int timeout) Set the timeoutSet the User-Agent
-
Method Details
-
create
Create a new ClientBuilder -
baseUrl
Set the base URL for the API- Parameters:
baseUrl- the base URL, e.g. "https://api.mineskin.org"
-
userAgent
Set the User-Agent -
apiKey
Set the API key -
timeout
Set the timeout -
gson
Set the Gson instance -
getExecutor
Set the Executor for get requests -
generateExecutor
Set the Executor for generate requests -
generateRequestScheduler
@Deprecated public ClientBuilder generateRequestScheduler(ScheduledExecutorService scheduledExecutor) Deprecated.usegenerateQueueOptions(QueueOptions)insteadSet the ScheduledExecutorService for submitting queue jobs -
generateQueueOptions
Set the options for submitting queue jobs
defaults to 200ms interval and 1 concurrent request -
getRequestScheduler
Deprecated.usegetQueueOptions(QueueOptions)insteadSet the ScheduledExecutorService for get requests, e.g. getting skins -
getQueueOptions
Set the options for get requests, e.g. getting skins
defaults to 100ms interval and 5 concurrent requests -
jobCheckScheduler
Deprecated.usejobCheckOptions(JobCheckOptions)insteadSet the ScheduledExecutorService for checking job status -
jobCheckOptions
Set the options for checking job status
defaults to 1000ms interval, 2000ms initial delay, and 10 max attempts -
requestHandler
Set the constructor for the RequestHandler -
build
Build the MineSkinClient
-
generateQueueOptions(QueueOptions)instead