Serialized Form
-
Package io.github.devlibx.easy.http.config
-
Class io.github.devlibx.easy.http.config.Api
class Api extends Object implements Serializable-
Serialized Fields
-
acceptableCodes
List<Integer> acceptableCodes
What status codes are considered as acceptable. If we get http status in response which is one of these then that call will not be considered as failure. -
async
boolean async
Use async HTTP client i.e. use async-ioe.g. a netty based HTTP client to make call to server
-
concurrency
int concurrency
Max no of concurrent request for this APIs -
configPreProcessors
List<String> configPreProcessors
-
fallbackApiName
String fallbackApiName
Fallback API to call if this API fails -
headers
StringObjectMap headers
Setup common headers -
method
String method
HTTP method to be used for this request -
name
String name
Name of this API -
noWarmUp
boolean noWarmUp
We will warm-up all the http connection pool and threads at the time of boot-up. If noWarmUp=true then this bootstrap process will not be done.default = false i.e. warm-up connections and thread at bootup
-
path
String path
API path -
queueSize
int queueSize
concurrency is the no of parallel request this API can handle. queueSize is the additional queue where we park a request if we are already processing "N=concurrency" requests.Once we process the running requests, we pick the request from this queue.
e.g. concurrency=2 and queueSize=100
This means that we can take burst of 102 requests.
-
rps
int rps
RPS of this API. If this is set to non-zero then "ConcurrencyApiConfigPreProcessor" will execute and will update you concurrency to optimize your required threads/semaphore. -
server
String server
Name of the server to be used for this request -
timeout
int timeout
If server took > timeout to complete a request then this timeout will occure.1 sec is default.
-
timeoutDeltaFactor
float timeoutDeltaFactor
We add this extra time to overall request. This is to account for time consumed in other activities e.g. connection creation, thread allocating if required etc.e.g. If your timeout is 1000 and this value is 0.1 then we will set socket timeout = (1000 + 1000 * 0.1 = 1100)
-
type
String type
Type of this API (valid type = HTTP | HTTPS ) -
waitBeforeClosingCircuitAfterError
int waitBeforeClosingCircuitAfterError
How long to wait before we need to check if we can retry after circuit was openned
-
-
-
Class io.github.devlibx.easy.http.config.Config
class Config extends Object implements Serializable -
Class io.github.devlibx.easy.http.config.Server
class Server extends Object implements Serializable-
Serialized Fields
-
connectionRequestTimeout
int connectionRequestTimeout
A http request needs to get a connection from pool. This timeout specifies how long this connection request should wait.Default = 100ms
Why we get this type of timeout -> if we have small connection pool and all connections are busy then we will get this timeout.
-
connectTimeout
int connectTimeout
A http request needs to connect to a server first. This timeout specifies how long this connection creation should take. Beyond this time it will fail with timeout.Default = 100ms
Why we get this type of timeout -> when we connect to server, it may be busy or server may be down.
-
host
String host
Host URL -
idleConnectionTimeoutInSec
int idleConnectionTimeoutInSec
-
isHttps
boolean isHttps
-
name
String name
Name for this server -
pollingConnectionTtlInMs
int pollingConnectionTtlInMs
Set TTL to polled http connection. If -1 then no TTL. Default is 60 Sec; -
port
int port
Port of this service. Default = 80
-
-
-
-
Package io.github.devlibx.easy.http.exception
-
Exception Class io.github.devlibx.easy.http.exception.EasyHttpExceptions.Easy4xxException
class Easy4xxException extends EasyHttpExceptions.EasyHttpRequestException implements Serializable -
Exception Class io.github.devlibx.easy.http.exception.EasyHttpExceptions.Easy5xxException
class Easy5xxException extends EasyHttpExceptions.EasyHttpRequestException implements Serializable -
Exception Class io.github.devlibx.easy.http.exception.EasyHttpExceptions.EasyBadGatewayException
class EasyBadGatewayException extends EasyHttpExceptions.Easy5xxException implements Serializable -
Exception Class io.github.devlibx.easy.http.exception.EasyHttpExceptions.EasyBadRequestException
class EasyBadRequestException extends EasyHttpExceptions.Easy4xxException implements Serializable -
Exception Class io.github.devlibx.easy.http.exception.EasyHttpExceptions.EasyConflictRequestException
class EasyConflictRequestException extends EasyHttpExceptions.Easy4xxException implements Serializable -
Exception Class io.github.devlibx.easy.http.exception.EasyHttpExceptions.EasyGatewayTimeoutException
class EasyGatewayTimeoutException extends EasyHttpExceptions.Easy5xxException implements Serializable -
Exception Class io.github.devlibx.easy.http.exception.EasyHttpExceptions.EasyGoneException
class EasyGoneException extends EasyHttpExceptions.Easy4xxException implements Serializable -
Exception Class io.github.devlibx.easy.http.exception.EasyHttpExceptions.EasyHttpRequestException
class EasyHttpRequestException extends RuntimeException implements Serializable-
Serialized Fields
-
body
byte[] body
-
response
ResponseObject response
-
statusCode
int statusCode
-
-
-
Exception Class io.github.devlibx.easy.http.exception.EasyHttpExceptions.EasyInternalServerErrorException
class EasyInternalServerErrorException extends EasyHttpExceptions.Easy5xxException implements Serializable -
Exception Class io.github.devlibx.easy.http.exception.EasyHttpExceptions.EasyMethodNotAllowedException
class EasyMethodNotAllowedException extends EasyHttpExceptions.Easy4xxException implements Serializable -
Exception Class io.github.devlibx.easy.http.exception.EasyHttpExceptions.EasyNotAcceptableException
class EasyNotAcceptableException extends EasyHttpExceptions.Easy4xxException implements Serializable -
Exception Class io.github.devlibx.easy.http.exception.EasyHttpExceptions.EasyNotFoundException
class EasyNotFoundException extends EasyHttpExceptions.Easy4xxException implements Serializable -
Exception Class io.github.devlibx.easy.http.exception.EasyHttpExceptions.EasyNotImplementedException
class EasyNotImplementedException extends EasyHttpExceptions.Easy5xxException implements Serializable -
Exception Class io.github.devlibx.easy.http.exception.EasyHttpExceptions.EasyRequestTimeOutException
class EasyRequestTimeOutException extends EasyHttpExceptions.Easy4xxException implements Serializable -
Exception Class io.github.devlibx.easy.http.exception.EasyHttpExceptions.EasyResilienceCircuitOpenException
class EasyResilienceCircuitOpenException extends EasyHttpExceptions.EasyResilienceException implements Serializable -
Exception Class io.github.devlibx.easy.http.exception.EasyHttpExceptions.EasyResilienceException
class EasyResilienceException extends EasyHttpExceptions.EasyHttpRequestException implements Serializable -
Exception Class io.github.devlibx.easy.http.exception.EasyHttpExceptions.EasyResilienceOverflowException
class EasyResilienceOverflowException extends EasyHttpExceptions.EasyResilienceException implements Serializable -
Exception Class io.github.devlibx.easy.http.exception.EasyHttpExceptions.EasyResilienceRequestTimeoutException
class EasyResilienceRequestTimeoutException extends EasyHttpExceptions.EasyResilienceException implements Serializable -
Exception Class io.github.devlibx.easy.http.exception.EasyHttpExceptions.EasyTooManyRequestsException
class EasyTooManyRequestsException extends EasyHttpExceptions.Easy4xxException implements Serializable -
Exception Class io.github.devlibx.easy.http.exception.EasyHttpExceptions.EasyUnauthorizedRequestException
class EasyUnauthorizedRequestException extends EasyHttpExceptions.Easy4xxException implements Serializable
-