Package org.opensaml.spring.tls

# Class TLSSocketFactoryFactoryBean

java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<org.apache.hc.client5.http.socket.LayeredConnectionSocketFactory>
org.opensaml.spring.tls.TLSSocketFactoryFactoryBean

All Implemented Interfaces:
  `Aware`, `BeanClassLoaderAware`, `BeanFactoryAware`, `DisposableBean`, `FactoryBean<org.apache.hc.client5.http.socket.LayeredConnectionSocketFactory>`, `InitializingBean`

public class TLSSocketFactoryFactoryBean extends AbstractFactoryBean<org.apache.hc.client5.http.socket.LayeredConnectionSocketFactory>
A factory bean for producing instances of `LayeredConnectionSocketFactory` for use in `HttpClient`.

## Field Summary

Fields
Modifier and Type
Field
Description
`private boolean`
`connectionDisregardTLSCertificate`
Whether the responder's SSL/TLS certificate should be ignored.
`private HttpClientSecurityParameters`
`httpClientSecurityParameters`
The optional HttpClient security parameters instance that will be used with the HttpClient instance.
`private TrustEngine<?>`
`tlsTrustEngine`
The optional trust engine used in evaluating server TLS credentials.

### Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean

`logger`

### Fields inherited from interface org.springframework.beans.factory.FactoryBean

`OBJECT_TYPE_ATTRIBUTE`

## Constructor Summary

Constructors
Constructor
Description
`TLSSocketFactoryFactoryBean()`

## Method Summary

Modifier and Type
Method
Description
`protected org.apache.hc.client5.http.socket.LayeredConnectionSocketFactory`
`createInstance()`
`Class<org.apache.hc.client5.http.socket.LayeredConnectionSocketFactory>`
`getObjectType()`
`void`
`setConnectionDisregardTLSCertificate(boolean disregard)`
Sets whether the responder's SSL/TLS certificate should be ignored.
`void`
`setHttpClientSecurityParameters(HttpClientSecurityParameters params)`
Sets the optional HttpClient security parameters instance that will be used with the HttpClient instance.
`void`
`setTLSTrustEngine(TrustEngine<? super X509Credential> engine)`
Deprecated, for removal: This API element is subject to removal in a future version.
use setHttpClientSecurityParameters instead

### Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean

`afterPropertiesSet, destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### tlsTrustEngine

@Nullable private TrustEngine<?> tlsTrustEngine
The optional trust engine used in evaluating server TLS credentials.

### httpClientSecurityParameters

@Nullable private HttpClientSecurityParameters httpClientSecurityParameters
The optional HttpClient security parameters instance that will be used with the HttpClient instance.

### connectionDisregardTLSCertificate

private boolean connectionDisregardTLSCertificate
Whether the responder's SSL/TLS certificate should be ignored.

## Constructor Details

### TLSSocketFactoryFactoryBean

public TLSSocketFactoryFactoryBean()

## Method Details

### setTLSTrustEngine

@Deprecated(since="5.0.0", forRemoval=true) public void setTLSTrustEngine(@Nullable TrustEngine<? super X509Credential> engine)
Deprecated, for removal: This API element is subject to removal in a future version.
use setHttpClientSecurityParameters instead
Sets the optional trust engine used in evaluating server TLS credentials.

Parameters:
  `engine` - the trust engine instance to use, or null

### setHttpClientSecurityParameters

public void setHttpClientSecurityParameters(@Nullable HttpClientSecurityParameters params)
Sets the optional HttpClient security parameters instance that will be used with the HttpClient instance.

Parameters:
  `params` - the parameters, or null

### setConnectionDisregardTLSCertificate

public void setConnectionDisregardTLSCertificate(boolean disregard)
Sets whether the responder's SSL/TLS certificate should be ignored.

Parameters:
  `disregard` - whether the responder's SSL/TLS certificate should be ignored

### getObjectType

@Nonnull public Class<org.apache.hc.client5.http.socket.LayeredConnectionSocketFactory> getObjectType()

Specified by:
  `getObjectType` in interface `FactoryBean<org.apache.hc.client5.http.socket.LayeredConnectionSocketFactory>`
Specified by:
  `getObjectType` in class `AbstractFactoryBean<org.apache.hc.client5.http.socket.LayeredConnectionSocketFactory>`

### createInstance

@Nonnull protected org.apache.hc.client5.http.socket.LayeredConnectionSocketFactory createInstance() throws Exception

Specified by:
  `createInstance` in class `AbstractFactoryBean<org.apache.hc.client5.http.socket.LayeredConnectionSocketFactory>`
Throws:
  `Exception`