Package interlok.http.apache.async
Class AsyncWithCustomKeystores
- java.lang.Object
-
- interlok.http.apache.async.AsyncWithCustomKeystores
-
- All Implemented Interfaces:
HttpAsyncClientBuilderConfig
@ComponentProfile(since="4.5.0", summary="Allows you to configure custom keystores when building the HttpAsyncClient") public class AsyncWithCustomKeystores extends java.lang.Object implements HttpAsyncClientBuilderConfigHttpClientBuilderConfiguratorimplementation that allows you to customise keystores etc.In the adapter configuration file this class is aliased as apache-http-async-client-builder-with-custom-keystores which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Constructor Summary
Constructors Constructor Description AsyncWithCustomKeystores()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.http.impl.nio.client.HttpAsyncClientBuilderconfigure(org.apache.http.impl.nio.client.HttpAsyncClientBuilder builder)Do any additional configuration.ConfiguredKeystoregetKeystore()The keystore used with TLS.PrivateKeyPasswordProvidergetPrivateKeyPassword()The private key password.java.lang.BooleangetTrustSelfSigned()Whether or not to trust self signed certificates.ConfiguredKeystoregetTruststore()The truststore used with TLSvoidsetKeystore(ConfiguredKeystore keystore)The keystore used with TLS.voidsetPrivateKeyPassword(PrivateKeyPasswordProvider privateKeyPassword)The private key password.voidsetTrustSelfSigned(java.lang.Boolean trustSelfSigned)Whether or not to trust self signed certificates.voidsetTruststore(ConfiguredKeystore truststore)The truststore used with TLSprotected org.apache.http.ssl.TrustStrategytrustStrategy()<T extends AsyncWithCustomKeystores>
TwithKeystore(ConfiguredKeystore s)<T extends AsyncWithCustomKeystores>
TwithPrivateKeyPassword(PrivateKeyPasswordProvider s)<T extends AsyncWithCustomKeystores>
TwithTrustSelfSigned(java.lang.Boolean s)<T extends AsyncWithCustomKeystores>
TwithTrustStore(ConfiguredKeystore s)
-
-
-
Method Detail
-
configure
public org.apache.http.impl.nio.client.HttpAsyncClientBuilder configure(org.apache.http.impl.nio.client.HttpAsyncClientBuilder builder) throws java.lang.ExceptionDescription copied from interface:HttpAsyncClientBuilderConfigDo any additional configuration.- Specified by:
configurein interfaceHttpAsyncClientBuilderConfig- Parameters:
builder- the existing builder- Returns:
- a reconfigured builder.
- Throws:
java.lang.Exception
-
withTrustSelfSigned
public <T extends AsyncWithCustomKeystores> T withTrustSelfSigned(java.lang.Boolean s)
-
trustStrategy
protected org.apache.http.ssl.TrustStrategy trustStrategy()
-
withPrivateKeyPassword
public <T extends AsyncWithCustomKeystores> T withPrivateKeyPassword(PrivateKeyPasswordProvider s)
-
withTrustStore
public <T extends AsyncWithCustomKeystores> T withTrustStore(ConfiguredKeystore s)
-
withKeystore
public <T extends AsyncWithCustomKeystores> T withKeystore(ConfiguredKeystore s)
-
getTruststore
public ConfiguredKeystore getTruststore()
The truststore used with TLS
-
setTruststore
public void setTruststore(ConfiguredKeystore truststore)
The truststore used with TLS
-
getKeystore
public ConfiguredKeystore getKeystore()
The keystore used with TLS.
-
setKeystore
public void setKeystore(ConfiguredKeystore keystore)
The keystore used with TLS.
-
getPrivateKeyPassword
public PrivateKeyPasswordProvider getPrivateKeyPassword()
The private key password.
-
setPrivateKeyPassword
public void setPrivateKeyPassword(PrivateKeyPasswordProvider privateKeyPassword)
The private key password.
-
getTrustSelfSigned
public java.lang.Boolean getTrustSelfSigned()
Whether or not to trust self signed certificates.Defaults to false if not explicitly configured.
-
setTrustSelfSigned
public void setTrustSelfSigned(java.lang.Boolean trustSelfSigned)
Whether or not to trust self signed certificates.Defaults to false if not explicitly configured.
-
-