use of org.apache.nifi.io.socket.SSLContextFactory in project nifi by apache.
the class ServerSocketConfigurationFactoryBean method getObject.
@Override
public ServerSocketConfiguration getObject() throws Exception {
if (configuration == null) {
configuration = new ServerSocketConfiguration();
configuration.setNeedClientAuth(properties.getNeedClientAuth());
final int timeout = (int) FormatUtils.getTimeDuration(properties.getClusterNodeReadTimeout(), TimeUnit.MILLISECONDS);
configuration.setSocketTimeout(timeout);
configuration.setReuseAddress(true);
if (Boolean.valueOf(properties.getProperty(NiFiProperties.CLUSTER_PROTOCOL_IS_SECURE))) {
configuration.setSSLContextFactory(new SSLContextFactory(properties));
}
}
return configuration;
}
use of org.apache.nifi.io.socket.SSLContextFactory in project nifi by apache.
the class SocketConfigurationFactoryBean method getObject.
@Override
public SocketConfiguration getObject() throws Exception {
if (configuration == null) {
configuration = new SocketConfiguration();
final int timeout = (int) FormatUtils.getTimeDuration(properties.getClusterNodeReadTimeout(), TimeUnit.MILLISECONDS);
configuration.setSocketTimeout(timeout);
configuration.setReuseAddress(true);
if (Boolean.valueOf(properties.getProperty(NiFiProperties.CLUSTER_PROTOCOL_IS_SECURE))) {
configuration.setSSLContextFactory(new SSLContextFactory(properties));
}
}
return configuration;
}
Aggregations