Package com.kaltura.client
Class APIOkRequestsExecutor
- java.lang.Object
-
- com.kaltura.client.APIOkRequestsExecutor
-
- All Implemented Interfaces:
RequestQueue
public class APIOkRequestsExecutor extends Object implements RequestQueue
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceAPIOkRequestsExecutor.IdFactory
-
Field Summary
Fields Modifier and Type Field Description protected static HostnameVerifierhostnameVerifierprotected static ILoggerloggerprotected static APIOkRequestsExecutorselfstatic StringTAGprotected static TrustManager[]trustAllCertsprotected static SSLContexttrustAllSslContextprotected static SSLSocketFactorytrustAllSslSocketFactory
-
Constructor Summary
Constructors Constructor Description APIOkRequestsExecutor()APIOkRequestsExecutor(ConnectionConfiguration defaultConfiguration)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancelRequest(String reqId)voidclearRequests()voidenableLogResponseHeader(String header, boolean log)voidenableLogs(boolean enable)Response<?>execute(RequestElement request)static APIOkRequestsExecutorgetExecutor()static StringgetRequestBody(okhttp3.Request request)protected StringgetRequestId(okhttp3.Response response)booleanhasRequest(String reqId)booleanisEmpty()protected ResponseElementonGotResponse(okhttp3.Response response, RequestElement action)protected voidpostCompletion(RequestElement action, ResponseElement responseElement)Stringqueue(RequestElement requestElement)voidsetDefaultConfiguration(ConnectionConfiguration defaultConfiguration)APIOkRequestsExecutorsetRequestIdFactory(APIOkRequestsExecutor.IdFactory factory)
-
-
-
Field Detail
-
TAG
public static final String TAG
- See Also:
- Constant Field Values
-
logger
protected static ILogger logger
-
self
protected static APIOkRequestsExecutor self
-
hostnameVerifier
protected static HostnameVerifier hostnameVerifier
-
trustAllCerts
protected static final TrustManager[] trustAllCerts
-
trustAllSslContext
protected static final SSLContext trustAllSslContext
-
trustAllSslSocketFactory
protected static final SSLSocketFactory trustAllSslSocketFactory
-
-
Constructor Detail
-
APIOkRequestsExecutor
public APIOkRequestsExecutor()
-
APIOkRequestsExecutor
public APIOkRequestsExecutor(ConnectionConfiguration defaultConfiguration)
-
-
Method Detail
-
getExecutor
public static APIOkRequestsExecutor getExecutor()
-
setRequestIdFactory
public APIOkRequestsExecutor setRequestIdFactory(APIOkRequestsExecutor.IdFactory factory)
-
setDefaultConfiguration
public void setDefaultConfiguration(ConnectionConfiguration defaultConfiguration)
- Specified by:
setDefaultConfigurationin interfaceRequestQueue
-
enableLogs
public void enableLogs(boolean enable)
- Specified by:
enableLogsin interfaceRequestQueue
-
enableLogResponseHeader
public void enableLogResponseHeader(String header, boolean log)
- Specified by:
enableLogResponseHeaderin interfaceRequestQueue
-
queue
public String queue(RequestElement requestElement)
- Specified by:
queuein interfaceRequestQueue
-
postCompletion
protected void postCompletion(RequestElement action, ResponseElement responseElement)
-
execute
public Response<?> execute(RequestElement request)
- Specified by:
executein interfaceRequestQueue
-
hasRequest
public boolean hasRequest(String reqId)
-
cancelRequest
public void cancelRequest(String reqId)
- Specified by:
cancelRequestin interfaceRequestQueue
-
clearRequests
public void clearRequests()
- Specified by:
clearRequestsin interfaceRequestQueue
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceRequestQueue
-
onGotResponse
protected ResponseElement onGotResponse(okhttp3.Response response, RequestElement action)
-
getRequestId
protected String getRequestId(okhttp3.Response response)
-
getRequestBody
public static String getRequestBody(okhttp3.Request request)
-
-