-
- All Implemented Interfaces:
-
org.acra.config.ConfigurationBuilder
public final class HttpSenderConfigurationBuilder implements ConfigurationBuilderClass generated based on AcraHttpSender (Jun 1, 2021 1:45:27 PM)
-
-
Field Summary
Fields Modifier and Type Field Description private Contextcontextprivate Booleanenabledprivate Stringuriprivate StringbasicAuthLoginprivate StringbasicAuthPasswordprivate HttpSender.MethodhttpMethodprivate IntegerconnectionTimeoutprivate IntegersocketTimeoutprivate BooleandropReportsOnTimeoutprivate Class<out KeyStoreFactory>keyStoreFactoryClassprivate StringcertificatePathprivate IntegerresCertificateprivate StringcertificateTypeprivate Booleancompressprivate Array<out TLS>tlsProtocolsprivate BaseHttpConfigurationBuilderdelegate
-
Constructor Summary
Constructors Constructor Description HttpSenderConfigurationBuilder(Context arg0)
-
Method Summary
Modifier and Type Method Description final ContextgetContext()final UnitsetContext(Context context)final BooleangetEnabled()final UnitsetEnabled(Boolean enabled)final StringgetUri()The Uri of your own server-side script that will receive reports. final UnitsetUri(String uri)The Uri of your own server-side script that will receive reports. final StringgetBasicAuthLogin()you can set here and in {@link org.acra.annotation.AcraHttpSender#basicAuthPassword()} the credentials for a BASIC HTTP authentication. final UnitsetBasicAuthLogin(String basicAuthLogin)you can set here and in {@link org.acra.annotation.AcraHttpSender#basicAuthPassword()} the credentials for a BASIC HTTP authentication. final StringgetBasicAuthPassword()you can set here and in {@link org.acra.annotation.AcraHttpSender#basicAuthLogin()} the credentials for a BASIC HTTP authentication. final UnitsetBasicAuthPassword(String basicAuthPassword)you can set here and in {@link org.acra.annotation.AcraHttpSender#basicAuthLogin()} the credentials for a BASIC HTTP authentication. final HttpSender.MethodgetHttpMethod()<p> The {@link HttpSender.Method} to be used when posting with {@link org.acra.annotation.AcraHttpSender#uri()} . final UnitsetHttpMethod(HttpSender.Method httpMethod)<p> The {@link HttpSender.Method} to be used when posting with {@link org.acra.annotation.AcraHttpSender#uri()} . final IntegergetConnectionTimeout()timeout for server connection final UnitsetConnectionTimeout(Integer connectionTimeout)timeout for server connection final IntegergetSocketTimeout()timeout for socket connection final UnitsetSocketTimeout(Integer socketTimeout)timeout for socket connection final BooleangetDropReportsOnTimeout()allows to prevent resending of timed out reports, possibly relieving server stress, but also reducing received report counts final UnitsetDropReportsOnTimeout(Boolean dropReportsOnTimeout)allows to prevent resending of timed out reports, possibly relieving server stress, but also reducing received report counts final Class<out KeyStoreFactory>getKeyStoreFactoryClass()A custom class supplying a {@link java.security.KeyStore}, which will be used for ssl authentication. final UnitsetKeyStoreFactoryClass(Class<out KeyStoreFactory> keyStoreFactoryClass)A custom class supplying a {@link java.security.KeyStore}, which will be used for ssl authentication. final StringgetCertificatePath()a certificate used for ssl authentication final UnitsetCertificatePath(String certificatePath)a certificate used for ssl authentication final IntegergetResCertificate()a certificate used for ssl authentication final UnitsetResCertificate(@RawRes() Integer resCertificate)a certificate used for ssl authentication final StringgetCertificateType()type of the certificate used for ssl authentication final UnitsetCertificateType(String certificateType)type of the certificate used for ssl authentication final BooleangetCompress()if the server request should be compressed using gzip final UnitsetCompress(Boolean compress)if the server request should be compressed using gzip final Array<out TLS>getTlsProtocols()Note: Older Android versions do not support all tls versions. final UnitsetTlsProtocols(Array<out TLS> tlsProtocols)Note: Older Android versions do not support all tls versions. final BaseHttpConfigurationBuildergetDelegate()final UnitsetDelegate(BaseHttpConfigurationBuilder delegate)final HttpSenderConfigurationBuilderwithEnabled(Boolean enabled)final HttpSenderConfigurationBuilderwithUri(String uri)The Uri of your own server-side script that will receive reports. final HttpSenderConfigurationBuilderwithBasicAuthLogin(String basicAuthLogin)you can set here and in {@link org.acra.annotation.AcraHttpSender#basicAuthPassword()} the credentials for a BASIC HTTP authentication. final HttpSenderConfigurationBuilderwithBasicAuthPassword(String basicAuthPassword)you can set here and in {@link org.acra.annotation.AcraHttpSender#basicAuthLogin()} the credentials for a BASIC HTTP authentication. final HttpSenderConfigurationBuilderwithHttpMethod(HttpSender.Method httpMethod)<p> The {@link HttpSender.Method} to be used when posting with {@link org.acra.annotation.AcraHttpSender#uri()} . final HttpSenderConfigurationBuilderwithConnectionTimeout(Integer connectionTimeout)timeout for server connection final HttpSenderConfigurationBuilderwithSocketTimeout(Integer socketTimeout)timeout for socket connection final HttpSenderConfigurationBuilderwithDropReportsOnTimeout(Boolean dropReportsOnTimeout)allows to prevent resending of timed out reports, possibly relieving server stress, but also reducing received report counts final HttpSenderConfigurationBuilderwithKeyStoreFactoryClass(Class<out KeyStoreFactory> keyStoreFactoryClass)A custom class supplying a {@link java.security.KeyStore}, which will be used for ssl authentication. final HttpSenderConfigurationBuilderwithCertificatePath(String certificatePath)a certificate used for ssl authentication final HttpSenderConfigurationBuilderwithResCertificate(@RawRes() Integer resCertificate)a certificate used for ssl authentication final HttpSenderConfigurationBuilderwithCertificateType(String certificateType)type of the certificate used for ssl authentication final HttpSenderConfigurationBuilderwithCompress(Boolean compress)if the server request should be compressed using gzip final HttpSenderConfigurationBuilderwithTlsProtocols(TLS tlsProtocols)Note: Older Android versions do not support all tls versions. final HttpSenderConfigurationBuildersetHttpHeaders(Map<String, String> headers)Set custom HTTP headers to be sent by the provided org.acra.sender.HttpSender This should be used also by third party senders. final Map<String, String>httpHeaders()HttpSenderConfigurationbuild()-
-
Constructor Detail
-
HttpSenderConfigurationBuilder
HttpSenderConfigurationBuilder(Context arg0)
-
-
Method Detail
-
getContext
final Context getContext()
-
setContext
final Unit setContext(Context context)
-
getEnabled
final Boolean getEnabled()
-
setEnabled
final Unit setEnabled(Boolean enabled)
-
setUri
final Unit setUri(String uri)
The Uri of your own server-side script that will receive reports.
-
getBasicAuthLogin
final String getBasicAuthLogin()
you can set here and in {@link org.acra.annotation.AcraHttpSender#basicAuthPassword()} the credentials for a BASIC HTTP authentication.
-
setBasicAuthLogin
final Unit setBasicAuthLogin(String basicAuthLogin)
you can set here and in {@link org.acra.annotation.AcraHttpSender#basicAuthPassword()} the credentials for a BASIC HTTP authentication.
-
getBasicAuthPassword
final String getBasicAuthPassword()
you can set here and in {@link org.acra.annotation.AcraHttpSender#basicAuthLogin()} the credentials for a BASIC HTTP authentication.
-
setBasicAuthPassword
final Unit setBasicAuthPassword(String basicAuthPassword)
you can set here and in {@link org.acra.annotation.AcraHttpSender#basicAuthLogin()} the credentials for a BASIC HTTP authentication.
-
getHttpMethod
final HttpSender.Method getHttpMethod()
<p> The {@link HttpSender.Method} to be used when posting with {@link org.acra.annotation.AcraHttpSender#uri()} . </p>
-
setHttpMethod
final Unit setHttpMethod(HttpSender.Method httpMethod)
<p> The {@link HttpSender.Method} to be used when posting with {@link org.acra.annotation.AcraHttpSender#uri()} . </p>
-
getConnectionTimeout
final Integer getConnectionTimeout()
timeout for server connection
-
setConnectionTimeout
final Unit setConnectionTimeout(Integer connectionTimeout)
timeout for server connection
-
getSocketTimeout
final Integer getSocketTimeout()
timeout for socket connection
-
setSocketTimeout
final Unit setSocketTimeout(Integer socketTimeout)
timeout for socket connection
-
getDropReportsOnTimeout
final Boolean getDropReportsOnTimeout()
allows to prevent resending of timed out reports, possibly relieving server stress, but also reducing received report counts
-
setDropReportsOnTimeout
final Unit setDropReportsOnTimeout(Boolean dropReportsOnTimeout)
allows to prevent resending of timed out reports, possibly relieving server stress, but also reducing received report counts
-
getKeyStoreFactoryClass
final Class<out KeyStoreFactory> getKeyStoreFactoryClass()
A custom class supplying a {@link java.security.KeyStore}, which will be used for ssl authentication. A base implementation is available: {@link org.acra.security.BaseKeyStoreFactory}
-
setKeyStoreFactoryClass
final Unit setKeyStoreFactoryClass(Class<out KeyStoreFactory> keyStoreFactoryClass)
A custom class supplying a {@link java.security.KeyStore}, which will be used for ssl authentication. A base implementation is available: {@link org.acra.security.BaseKeyStoreFactory}
-
getCertificatePath
final String getCertificatePath()
a certificate used for ssl authentication
-
setCertificatePath
final Unit setCertificatePath(String certificatePath)
a certificate used for ssl authentication
-
getResCertificate
final Integer getResCertificate()
a certificate used for ssl authentication
-
setResCertificate
final Unit setResCertificate(@RawRes() Integer resCertificate)
a certificate used for ssl authentication
-
getCertificateType
final String getCertificateType()
type of the certificate used for ssl authentication
-
setCertificateType
final Unit setCertificateType(String certificateType)
type of the certificate used for ssl authentication
-
getCompress
final Boolean getCompress()
if the server request should be compressed using gzip
-
setCompress
final Unit setCompress(Boolean compress)
if the server request should be compressed using gzip
-
getTlsProtocols
final Array<out TLS> getTlsProtocols()
Note: Older Android versions do not support all tls versions. This array has to contain at least one option supported on all android versions this runs on! ACRA will automatically remove unsupported versions on older devices.
-
setTlsProtocols
final Unit setTlsProtocols(Array<out TLS> tlsProtocols)
Note: Older Android versions do not support all tls versions. This array has to contain at least one option supported on all android versions this runs on! ACRA will automatically remove unsupported versions on older devices.
-
getDelegate
final BaseHttpConfigurationBuilder getDelegate()
-
setDelegate
final Unit setDelegate(BaseHttpConfigurationBuilder delegate)
-
withEnabled
final HttpSenderConfigurationBuilder withEnabled(Boolean enabled)
-
withUri
final HttpSenderConfigurationBuilder withUri(String uri)
The Uri of your own server-side script that will receive reports.
- Parameters:
uri- URI of a server to which to send reports.
-
withBasicAuthLogin
final HttpSenderConfigurationBuilder withBasicAuthLogin(String basicAuthLogin)
you can set here and in {@link org.acra.annotation.AcraHttpSender#basicAuthPassword()} the credentials for a BASIC HTTP authentication.
- Parameters:
basicAuthLogin- Login to use.
-
withBasicAuthPassword
final HttpSenderConfigurationBuilder withBasicAuthPassword(String basicAuthPassword)
you can set here and in {@link org.acra.annotation.AcraHttpSender#basicAuthLogin()} the credentials for a BASIC HTTP authentication.
- Parameters:
basicAuthPassword- Password to use.
-
withHttpMethod
final HttpSenderConfigurationBuilder withHttpMethod(HttpSender.Method httpMethod)
<p> The {@link HttpSender.Method} to be used when posting with {@link org.acra.annotation.AcraHttpSender#uri()} . </p>- Parameters:
httpMethod- HTTP method used when posting reports.
-
withConnectionTimeout
final HttpSenderConfigurationBuilder withConnectionTimeout(Integer connectionTimeout)
timeout for server connection
- Parameters:
connectionTimeout- Value in milliseconds for timeout attempting to connect to a network.
-
withSocketTimeout
final HttpSenderConfigurationBuilder withSocketTimeout(Integer socketTimeout)
timeout for socket connection
- Parameters:
socketTimeout- Value in milliseconds for timeout receiving a response to a network request.
-
withDropReportsOnTimeout
final HttpSenderConfigurationBuilder withDropReportsOnTimeout(Boolean dropReportsOnTimeout)
allows to prevent resending of timed out reports, possibly relieving server stress, but also reducing received report counts
- Parameters:
dropReportsOnTimeout- if timed out reports should be dropped
-
withKeyStoreFactoryClass
final HttpSenderConfigurationBuilder withKeyStoreFactoryClass(Class<out KeyStoreFactory> keyStoreFactoryClass)
A custom class supplying a {@link java.security.KeyStore}, which will be used for ssl authentication. A base implementation is available: {@link org.acra.security.BaseKeyStoreFactory}
- Parameters:
keyStoreFactoryClass- Class which creates a keystore that can contain trusted certificates
-
withCertificatePath
final HttpSenderConfigurationBuilder withCertificatePath(String certificatePath)
a certificate used for ssl authentication
- Parameters:
certificatePath- path to a custom trusted certificate.
-
withResCertificate
final HttpSenderConfigurationBuilder withResCertificate(@RawRes() Integer resCertificate)
a certificate used for ssl authentication
- Parameters:
resCertificate- resource id of a custom trusted certificate.
-
withCertificateType
final HttpSenderConfigurationBuilder withCertificateType(String certificateType)
type of the certificate used for ssl authentication
- Parameters:
certificateType- specify the type of the certificate set in either {@link org.acra.annotation.AcraHttpSender#certificatePath()} or {@link org.acra.annotation.
-
withCompress
final HttpSenderConfigurationBuilder withCompress(Boolean compress)
if the server request should be compressed using gzip
- Parameters:
compress- if compression should be active
-
withTlsProtocols
final HttpSenderConfigurationBuilder withTlsProtocols(TLS tlsProtocols)
Note: Older Android versions do not support all tls versions. This array has to contain at least one option supported on all android versions this runs on! ACRA will automatically remove unsupported versions on older devices.
- Parameters:
tlsProtocols- accepted tls protocols
-
setHttpHeaders
final HttpSenderConfigurationBuilder setHttpHeaders(Map<String, String> headers)
Set custom HTTP headers to be sent by the provided org.acra.sender.HttpSender This should be used also by third party senders.
- Parameters:
headers- A map associating HTTP header names to their values.
-
httpHeaders
@NotNull() final Map<String, String> httpHeaders()
-
build
HttpSenderConfiguration build()
-
-
-
-