You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* The base [OkHttpClient] instance that will be used to preconfigure PubNub SDK's internal clients.
22
+
*
23
+
* Please note that the internal clients will share the dispatcher and connection pool with the provided client.
24
+
*
25
+
* @see [subscribeOkHttpConfigureAction]
26
+
* @see [nonSubscribeOkHttpConfigureAction]
27
+
* @see [filesOkHttpConfigureAction]
28
+
*/
29
+
val baseOkHttpClient:OkHttpClient?
30
+
31
+
/**
32
+
* Use this callback to configure any options on the [OkHttpClient] instance that will be used for Subscribe requests.
33
+
*
34
+
* Setting this option disables reading values from [logVerbosity], [httpLoggingInterceptor], [sslSocketFactory],
35
+
* [connectionSpec], [hostnameVerifier], [proxy], [proxySelector], [proxyAuthenticator] and [certificatePinner] for
36
+
* the instance of `OkHttpClient` servicing Subscribe requests. Those options should be set using the
37
+
* [subscribeOkHttpConfigureAction] instead.
38
+
*/
39
+
val subscribeOkHttpConfigureAction: ((OkHttpClient.Builder) ->Unit)?
40
+
41
+
/**
42
+
* Use this callback to configure any options on the [OkHttpClient] instance that will be used for requests other than Subscribe or File upload/download.
43
+
*
44
+
* Setting this option disables reading values from [logVerbosity], [httpLoggingInterceptor], [sslSocketFactory],
45
+
* [connectionSpec], [hostnameVerifier], [proxy], [proxySelector], [proxyAuthenticator] and [certificatePinner] for
46
+
* the instance of `OkHttpClient` servicing requests other than Subscribe and File upload/download. Those options
47
+
* should be set using the [nonSubscribeOkHttpConfigureAction] instead.
48
+
*/
49
+
val nonSubscribeOkHttpConfigureAction: ((OkHttpClient.Builder) ->Unit)?
50
+
51
+
/**
52
+
* Use this callback to configure any options on the [OkHttpClient] instance that will be used for File upload/download requests.
53
+
*
54
+
* Setting this option disables reading values from [logVerbosity], [httpLoggingInterceptor], [sslSocketFactory],
55
+
* [connectionSpec], [hostnameVerifier], [proxy], [proxySelector], [proxyAuthenticator] and [certificatePinner] for
56
+
* the instance of `OkHttpClient` servicing File upload/download requests. Those options
57
+
* should be set using the [filesOkHttpConfigureAction] instead.
58
+
*/
59
+
val filesOkHttpConfigureAction: ((OkHttpClient.Builder) ->Unit)?
60
+
19
61
/**
20
62
* The user ID that the PubNub client will use.
21
63
*/
@@ -77,6 +119,9 @@ actual interface PNConfiguration {
77
119
/**
78
120
* Set to [PNLogVerbosity.BODY] to enable logging of network traffic, otherwise se to [PNLogVerbosity.NONE].
79
121
*/
122
+
@Deprecated(
123
+
message ="Use `subscribeOkHttpConfigureAction`, `nonSubscribeOkHttpConfigureAction`, or `filesOkHttpConfigureAction` to configure the OkHttp client."
124
+
)
80
125
actualval logVerbosity:PNLogVerbosity
81
126
82
127
/**
@@ -103,7 +148,7 @@ actual interface PNConfiguration {
103
148
val heartbeatInterval:Int
104
149
105
150
/**
106
-
* The subscribe request timeout.
151
+
* The subscribe read timeout.
107
152
*
108
153
* The value is in seconds.
109
154
*
@@ -147,6 +192,9 @@ actual interface PNConfiguration {
147
192
*
148
193
* Defaults to 10.
149
194
*/
195
+
@Deprecated(
196
+
message ="Use `subscribeOkHttpConfigureAction`, `nonSubscribeOkHttpConfigureAction`, or `filesOkHttpConfigureAction` to configure the OkHttp client."
197
+
)
150
198
val nonSubscribeReadTimeout:Int
151
199
152
200
/**
@@ -212,48 +260,75 @@ actual interface PNConfiguration {
212
260
*
213
261
* @see [Proxy]
214
262
*/
263
+
@Deprecated(
264
+
message ="Use `subscribeOkHttpConfigureAction`, `nonSubscribeOkHttpConfigureAction`, or `filesOkHttpConfigureAction` to configure the OkHttp client."
265
+
)
215
266
val proxy:Proxy?
216
267
217
268
/**
218
269
* @see [ProxySelector]
219
270
*/
271
+
@Deprecated(
272
+
message ="Use `subscribeOkHttpConfigureAction`, `nonSubscribeOkHttpConfigureAction`, or `filesOkHttpConfigureAction` to configure the OkHttp client."
273
+
)
220
274
val proxySelector:ProxySelector?
221
275
222
276
/**
223
277
* @see [Authenticator]
224
278
*/
279
+
@Deprecated(
280
+
message ="Use `subscribeOkHttpConfigureAction`, `nonSubscribeOkHttpConfigureAction`, or `filesOkHttpConfigureAction` to configure the OkHttp client."
281
+
)
225
282
val proxyAuthenticator:Authenticator?
226
283
227
284
/**
228
285
* @see [CertificatePinner]
229
286
*/
287
+
@Deprecated(
288
+
message ="Use `subscribeOkHttpConfigureAction`, `nonSubscribeOkHttpConfigureAction`, or `filesOkHttpConfigureAction` to configure the OkHttp client."
289
+
)
230
290
val certificatePinner:CertificatePinner?
231
291
232
292
/**
233
293
* Sets a custom [HttpLoggingInterceptor] for logging network traffic.
234
294
*
235
295
* @see [HttpLoggingInterceptor]
236
296
*/
297
+
@Deprecated(
298
+
message ="Use `subscribeOkHttpConfigureAction`, `nonSubscribeOkHttpConfigureAction`, or `filesOkHttpConfigureAction` to configure the OkHttp client."
299
+
)
237
300
val httpLoggingInterceptor:HttpLoggingInterceptor?
238
301
239
302
/**
240
303
* @see [SSLSocketFactory]
241
304
*/
305
+
@Deprecated(
306
+
message ="Use `subscribeOkHttpConfigureAction`, `nonSubscribeOkHttpConfigureAction`, or `filesOkHttpConfigureAction` to configure the OkHttp client."
307
+
)
242
308
val sslSocketFactory:SSLSocketFactory?
243
309
244
310
/**
245
311
* @see [X509ExtendedTrustManager]
246
312
*/
313
+
@Deprecated(
314
+
message ="Use `subscribeOkHttpConfigureAction`, `nonSubscribeOkHttpConfigureAction`, or `filesOkHttpConfigureAction` to configure the OkHttp client."
315
+
)
247
316
val x509ExtendedTrustManager:X509ExtendedTrustManager?
248
317
249
318
/**
250
319
* @see [okhttp3.ConnectionSpec]
251
320
*/
321
+
@Deprecated(
322
+
message ="Use `subscribeOkHttpConfigureAction`, `nonSubscribeOkHttpConfigureAction`, or `filesOkHttpConfigureAction` to configure the OkHttp client."
323
+
)
252
324
val connectionSpec:ConnectionSpec?
253
325
254
326
/**
255
327
* @see [javax.net.ssl.HostnameVerifier]
256
328
*/
329
+
@Deprecated(
330
+
message ="Use `subscribeOkHttpConfigureAction`, `nonSubscribeOkHttpConfigureAction`, or `filesOkHttpConfigureAction` to configure the OkHttp client."
331
+
)
257
332
val hostnameVerifier:HostnameVerifier?
258
333
259
334
/**
@@ -505,6 +580,9 @@ actual interface PNConfiguration {
505
580
/**
506
581
* @see [okhttp3.Dispatcher.setMaxRequestsPerHost]
507
582
*/
583
+
@Deprecated(
584
+
message ="Use `subscribeOkHttpConfigureAction`, `nonSubscribeOkHttpConfigureAction`, or `filesOkHttpConfigureAction` to configure the OkHttp client."
585
+
)
508
586
var maximumConnections:Int?
509
587
510
588
/**
@@ -594,6 +672,41 @@ actual interface PNConfiguration {
594
672
*/
595
673
var managePresenceListManually:Boolean
596
674
675
+
/**
676
+
* The base [OkHttpClient] instance that will be used to preconfigure PubNub SDK's internal `OKHttpClients`.
677
+
*/
678
+
var baseOkHttpClient:OkHttpClient?
679
+
680
+
/**
681
+
* Use this callback to configure any options on the [OkHttpClient] instance that will be used for Subscribe requests.
682
+
*
683
+
* Setting this option disables reading values from [logVerbosity], [httpLoggingInterceptor], [sslSocketFactory],
684
+
* [connectionSpec], [hostnameVerifier], [proxy], [proxySelector], [proxyAuthenticator] and [certificatePinner] for
685
+
* the instance of `OkHttpClient` servicing Subscribe requests. Those options should be set using the
686
+
* [subscribeOkHttpConfigureAction] instead.
687
+
*/
688
+
var subscribeOkHttpConfigureAction: ((OkHttpClient.Builder) ->Unit)?
689
+
690
+
/**
691
+
* Use this callback to configure any options on the [OkHttpClient] instance that will be used for requests other than Subscribe or File upload/download.
692
+
*
693
+
* Setting this option disables reading values from [logVerbosity], [httpLoggingInterceptor], [sslSocketFactory],
694
+
* [connectionSpec], [hostnameVerifier], [proxy], [proxySelector], [proxyAuthenticator] and [certificatePinner] for
695
+
* the instance of `OkHttpClient` servicing requests other than Subscribe and File upload/download. Those options
696
+
* should be set using the [nonSubscribeOkHttpConfigureAction] instead.
697
+
*/
698
+
var nonSubscribeOkHttpConfigureAction: ((OkHttpClient.Builder) ->Unit)?
699
+
700
+
/**
701
+
* Use this callback to configure any options on the [OkHttpClient] instance that will be used for File upload/download requests.
702
+
*
703
+
* Setting this option disables reading values from [logVerbosity], [httpLoggingInterceptor], [sslSocketFactory],
704
+
* [connectionSpec], [hostnameVerifier], [proxy], [proxySelector], [proxyAuthenticator] and [certificatePinner] for
705
+
* the instance of `OkHttpClient` servicing File upload/download requests. Those options
706
+
* should be set using the [filesOkHttpConfigureAction] instead.
707
+
*/
708
+
var filesOkHttpConfigureAction: ((OkHttpClient.Builder) ->Unit)?
709
+
597
710
/**
598
711
* Create a [PNConfiguration] object with values from this builder.
* Use this callback to configure any options on the [OkHttpClient] instance that will be used for Subscribe requests.
819
+
*
820
+
* Setting this option disables reading values from [logVerbosity], [httpLoggingInterceptor], [sslSocketFactory],
821
+
* [connectionSpec], [hostnameVerifier], [proxy], [proxySelector], [proxyAuthenticator] and [certificatePinner] for
822
+
* the instance of `OkHttpClient` servicing Subscribe requests. Those options should be set using the
823
+
* [subscribeOkHttpConfigureAction] instead.
824
+
*/
825
+
var subscribeOkHttpConfigureAction: ((OkHttpClient.Builder) ->Unit)?
826
+
827
+
/**
828
+
* Use this callback to configure any options on the [OkHttpClient] instance that will be used for requests other than Subscribe or File upload/download.
829
+
*
830
+
* Setting this option disables reading values from [logVerbosity], [httpLoggingInterceptor], [sslSocketFactory],
831
+
* [connectionSpec], [hostnameVerifier], [proxy], [proxySelector], [proxyAuthenticator] and [certificatePinner] for
832
+
* the instance of `OkHttpClient` servicing requests other than Subscribe and File upload/download. Those options
833
+
* should be set using the [nonSubscribeOkHttpConfigureAction] instead.
834
+
*/
835
+
var nonSubscribeOkHttpConfigureAction: ((OkHttpClient.Builder) ->Unit)?
836
+
837
+
/**
838
+
* Use this callback to configure any options on the [OkHttpClient] instance that will be used for File upload/download requests.
839
+
*
840
+
* Setting this option disables reading values from [logVerbosity], [httpLoggingInterceptor], [sslSocketFactory],
841
+
* [connectionSpec], [hostnameVerifier], [proxy], [proxySelector], [proxyAuthenticator] and [certificatePinner] for
842
+
* the instance of `OkHttpClient` servicing File upload/download requests. Those options
843
+
* should be set using the [filesOkHttpConfigureAction] instead.
844
+
*/
845
+
var filesOkHttpConfigureAction: ((OkHttpClient.Builder) ->Unit)?
846
+
704
847
/**
705
848
* Create a [PNConfiguration] object with values from this builder.
0 commit comments