Class LineMessagingClientBuilder
-
Method Summary
Modifier and TypeMethodDescriptionaddAuthenticationHeader
(boolean addAuthenticationHeader) Add authentication header.additionalInterceptors
(List<okhttp3.Interceptor> additionalInterceptors) Custom interceptors.apiEndPoint
(URI apiEndPoint) API Endpoint.blobEndPoint
(URI blobEndPoint) Blob Endpoint.build()
Creates a newLineMessagingService
.channelToken
(String channelToken) Set fixed channel token.channelTokenSupplier
(ChannelTokenSupplier channelTokenSupplier) Channel token supplier of this client.connectTimeout
(long connectTimeout) Connection timeout.okHttpClientBuilder
(okhttp3.OkHttpClient.Builder okHttpClientBuilder, boolean addAuthenticationHeader) Set customized OkHttpClient.Builder.readTimeout
(long readTimeout) Connection timeout.retrofitBuilder
(retrofit2.Retrofit.Builder retrofitBuilder) CustomRetrofit.Builder
used internally.toString()
writeTimeout
(long writeTimeout) Write timeout.
-
Method Details
-
apiEndPoint
API Endpoint.Default value = "https://api.line.me/".
-
channelToken
Set fixed channel token. This overwriteschannelTokenSupplier(ChannelTokenSupplier)
. -
okHttpClientBuilder
public LineMessagingClientBuilder okHttpClientBuilder(@NonNull okhttp3.OkHttpClient.Builder okHttpClientBuilder, boolean addAuthenticationHeader) Set customized OkHttpClient.Builder.In case of you need your own customized
OkHttpClient
, this builder allows specifyOkHttpClient.Builder
instance.To use this method, please add dependency to 'com.squareup.retrofit2:retrofit'.
- Parameters:
addAuthenticationHeader
- If it's true, the default authentication headers will be attached to all requests. Otherwise if it's false, you should insert your own authentication headers by yourself.
-
build
Creates a newLineMessagingService
. -
toString
-
blobEndPoint
Blob Endpoint.Default value = "https://api-data.line.me/".
- Returns:
this
.
-
connectTimeout
Connection timeout.Default value = 10000Lms.
- Returns:
this
.
-
readTimeout
Connection timeout.Default value = 10000Lms.
- Returns:
this
.
-
writeTimeout
Write timeout.Default value = 10000Lms.
- Returns:
this
.
-
channelTokenSupplier
Channel token supplier of this client.MUST BE NULL except you configured your own
- Returns:
this
.
-
retrofitBuilder
CustomRetrofit.Builder
used internally.If you want to use your own setting, specify
Retrofit.Builder
instance. Default builder is used in case ofnull
(default).To use this method, please add dependency to 'com.squareup.retrofit2:retrofit'.
- Returns:
this
.- See Also:
-
createDefaultRetrofitBuilder()
-
addAuthenticationHeader
Add authentication header.Default =
true
. If you manage authentication header yourself, set tofalse
.- Returns:
this
.
-
additionalInterceptors
public LineMessagingClientBuilder additionalInterceptors(List<okhttp3.Interceptor> additionalInterceptors) Custom interceptors.You can add your own interceptors.
Note: Authentication interceptor is automatically added by default.
- Returns:
this
.- See Also:
-