use of org.infinispan.server.core.configuration.SslConfigurationBuilder in project infinispan by infinispan.
the class SinglePortRouterBuilder method build.
/**
* Builds {@link HotRodRouterConfiguration}.
*/
public SinglePortRouterConfiguration build() {
if (this.enabled) {
try {
validate();
} catch (Exception e) {
throw RouterLogger.SERVER.configurationValidationError(e);
}
SslConfigurationBuilder sslConfigurationBuilder = new SslConfigurationBuilder(null);
if (sslContext != null) {
sslConfigurationBuilder.sslContext(sslContext).enable();
}
AttributeSet attributes = SinglePortRouterConfiguration.attributeDefinitionSet();
attributes.attribute(ProtocolServerConfiguration.NAME).set(name);
attributes.attribute(ProtocolServerConfiguration.HOST).set(ip.getHostName());
attributes.attribute(ProtocolServerConfiguration.PORT).set(port);
attributes.attribute(ProtocolServerConfiguration.IDLE_TIMEOUT).set(100);
attributes.attribute(ProtocolServerConfiguration.RECV_BUF_SIZE).set(receiveBufferSize);
attributes.attribute(ProtocolServerConfiguration.SEND_BUF_SIZE).set(sendBufferSize);
return new SinglePortRouterConfiguration(attributes.protect(), sslConfigurationBuilder.create(), new IpFilterConfiguration(Collections.emptyList()));
}
return null;
}
Aggregations