-
- All Implemented Interfaces:
-
com.mobwith.httpmodule.Call.Factory,com.mobwith.httpmodule.WebSocket.Factory,java.lang.Cloneable
public class MobonOkHttpClient implements Cloneable, Call.Factory, WebSocket.Factory
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classMobonOkHttpClient.Builder
-
Constructor Summary
Constructors Constructor Description MobonOkHttpClient()
-
Method Summary
Modifier and Type Method Description intconnectTimeoutMillis()Default connect timeout (in milliseconds). intreadTimeoutMillis()Default read timeout (in milliseconds). intwriteTimeoutMillis()Default write timeout (in milliseconds). intpingIntervalMillis()Web socket ping interval (in milliseconds). Proxyproxy()ProxySelectorproxySelector()CookieJarcookieJar()Cachecache()Dnsdns()SocketFactorysocketFactory()SSLSocketFactorysslSocketFactory()HostnameVerifierhostnameVerifier()CertificatePinnercertificatePinner()Authenticatorauthenticator()AuthenticatorproxyAuthenticator()ConnectionPoolconnectionPool()booleanfollowSslRedirects()booleanfollowRedirects()booleanretryOnConnectionFailure()Dispatcherdispatcher()List<Protocol>protocols()List<ConnectionSpec>connectionSpecs()List<Interceptor>interceptors()Returns an immutable list of interceptors that observe the full span of each call: from beforethe connection is established (if any) until after the response source is selected (either theorigin server, cache, or both). List<Interceptor>networkInterceptors()Returns an immutable list of interceptors that observe a single network mobonRequest and response. EventListener.FactoryeventListenerFactory()CallnewCall(Context context, MobonRequest mobonRequest)Prepares the {@code mobonRequest}to be executed at some point in the future.CallnewCall(MobonRequest mobonRequest)WebSocketnewWebSocket(MobonRequest mobonRequest, WebSocketListener listener)Uses {@code mobonRequest}to connect a new web socket.MobonOkHttpClient.BuildernewBuilder()-
-
Method Detail
-
connectTimeoutMillis
int connectTimeoutMillis()
Default connect timeout (in milliseconds).
-
readTimeoutMillis
int readTimeoutMillis()
Default read timeout (in milliseconds).
-
writeTimeoutMillis
int writeTimeoutMillis()
Default write timeout (in milliseconds).
-
pingIntervalMillis
int pingIntervalMillis()
Web socket ping interval (in milliseconds).
-
proxySelector
ProxySelector proxySelector()
-
socketFactory
SocketFactory socketFactory()
-
sslSocketFactory
SSLSocketFactory sslSocketFactory()
-
hostnameVerifier
HostnameVerifier hostnameVerifier()
-
certificatePinner
CertificatePinner certificatePinner()
-
authenticator
Authenticator authenticator()
-
proxyAuthenticator
Authenticator proxyAuthenticator()
-
connectionPool
ConnectionPool connectionPool()
-
followSslRedirects
boolean followSslRedirects()
-
followRedirects
boolean followRedirects()
-
retryOnConnectionFailure
boolean retryOnConnectionFailure()
-
dispatcher
Dispatcher dispatcher()
-
connectionSpecs
List<ConnectionSpec> connectionSpecs()
-
interceptors
List<Interceptor> interceptors()
Returns an immutable list of interceptors that observe the full span of each call: from beforethe connection is established (if any) until after the response source is selected (either theorigin server, cache, or both).
-
networkInterceptors
List<Interceptor> networkInterceptors()
Returns an immutable list of interceptors that observe a single network mobonRequest and response.These interceptors must call proceed exactly once: it is an error fora network interceptor to short-circuit or repeat a network mobonRequest.
-
eventListenerFactory
EventListener.Factory eventListenerFactory()
-
newCall
Call newCall(Context context, MobonRequest mobonRequest)
Prepares the
{@code mobonRequest}to be executed at some point in the future.
-
newCall
Call newCall(MobonRequest mobonRequest)
-
newWebSocket
WebSocket newWebSocket(MobonRequest mobonRequest, WebSocketListener listener)
Uses
{@code mobonRequest}to connect a new web socket.
-
newBuilder
MobonOkHttpClient.Builder newBuilder()
-
-
-
-