public interface HttpSenderConfigurationBuilder extends ConfigurationBuilder
AcraHttpSender
(18.03.2020 16:20:26)Modifier and Type | Method and Description |
---|---|
HttpSenderConfigurationBuilder |
setBasicAuthLogin(String basicAuthLogin)
you can set here and in
AcraHttpSender.basicAuthPassword() the credentials for a BASIC HTTP authentication. |
HttpSenderConfigurationBuilder |
setBasicAuthPassword(String basicAuthPassword)
you can set here and in
AcraHttpSender.basicAuthLogin() the credentials for a BASIC HTTP authentication. |
HttpSenderConfigurationBuilder |
setCertificatePath(String certificatePath)
a certificate used for ssl authentication
|
HttpSenderConfigurationBuilder |
setCertificateType(String certificateType)
type of the certificate used for ssl authentication
|
HttpSenderConfigurationBuilder |
setCompress(boolean compress)
if the server request should be compressed using gzip
|
HttpSenderConfigurationBuilder |
setConnectionTimeout(int connectionTimeout)
timeout for server connection
|
HttpSenderConfigurationBuilder |
setDropReportsOnTimeout(boolean dropReportsOnTimeout)
allows to prevent resending of timed out reports, possibly relieving server stress, but also reducing received report counts
|
HttpSenderConfigurationBuilder |
setEnabled(boolean enabled) |
HttpSenderConfigurationBuilder |
setHttpHeaders(Map<String,String> headers)
Set custom HTTP headers to be sent by the provided
HttpSender
This should be used also by third party senders. |
HttpSenderConfigurationBuilder |
setHttpMethod(HttpSender.Method httpMethod)
The
HttpSender.Method to be used when posting with AcraHttpSender.uri() . |
HttpSenderConfigurationBuilder |
setKeyStoreFactoryClass(Class<? extends KeyStoreFactory> keyStoreFactoryClass)
A custom class supplying a
KeyStore , which will be used for ssl authentication. |
HttpSenderConfigurationBuilder |
setResCertificate(int resCertificate)
a certificate used for ssl authentication
|
HttpSenderConfigurationBuilder |
setSocketTimeout(int socketTimeout)
timeout for socket connection
|
HttpSenderConfigurationBuilder |
setUri(String uri)
The Uri of your own server-side script that will receive reports.
|
build
@NonNull HttpSenderConfigurationBuilder setEnabled(boolean enabled)
@NonNull HttpSenderConfigurationBuilder setUri(@NonNull String uri)
uri
- URI of a server to which to send reports.@NonNull HttpSenderConfigurationBuilder setBasicAuthLogin(@NonNull String basicAuthLogin)
AcraHttpSender.basicAuthPassword()
the credentials for a BASIC HTTP authentication.basicAuthLogin
- Login to use.@NonNull HttpSenderConfigurationBuilder setBasicAuthPassword(@NonNull String basicAuthPassword)
AcraHttpSender.basicAuthLogin()
the credentials for a BASIC HTTP authentication.basicAuthPassword
- Password to use.@NonNull HttpSenderConfigurationBuilder setHttpMethod(@NonNull HttpSender.Method httpMethod)
The HttpSender.Method
to be used when posting with AcraHttpSender.uri()
.
httpMethod
- HTTP method used when posting reports.@NonNull HttpSenderConfigurationBuilder setConnectionTimeout(int connectionTimeout)
connectionTimeout
- Value in milliseconds for timeout attempting to connect to a network.URLConnection.setConnectTimeout(int)
@NonNull HttpSenderConfigurationBuilder setSocketTimeout(int socketTimeout)
socketTimeout
- Value in milliseconds for timeout receiving a response to a network request.URLConnection.setReadTimeout(int)
@NonNull HttpSenderConfigurationBuilder setDropReportsOnTimeout(boolean dropReportsOnTimeout)
dropReportsOnTimeout
- if timed out reports should be dropped@NonNull HttpSenderConfigurationBuilder setKeyStoreFactoryClass(@NonNull Class<? extends KeyStoreFactory> keyStoreFactoryClass)
KeyStore
, which will be used for ssl authentication.
A base implementation is available: BaseKeyStoreFactory
keyStoreFactoryClass
- Class which creates a keystore that can contain trusted certificates@NonNull HttpSenderConfigurationBuilder setCertificatePath(@NonNull String certificatePath)
certificatePath
- path to a custom trusted certificate. Must start with "asset://" if the file is in the assets folder@NonNull HttpSenderConfigurationBuilder setResCertificate(@RawRes int resCertificate)
resCertificate
- resource id of a custom trusted certificate.@NonNull HttpSenderConfigurationBuilder setCertificateType(@NonNull String certificateType)
certificateType
- specify the type of the certificate set in either AcraHttpSender.certificatePath()
or AcraHttpSender.resCertificate()
@NonNull HttpSenderConfigurationBuilder setCompress(boolean compress)
compress
- if compression should be active@NonNull HttpSenderConfigurationBuilder setHttpHeaders(Map<String,String> headers)
HttpSender
This should be used also by third party senders.headers
- A map associating HTTP header names to their values.