org.infinispan.client.rest.configuration.SecurityConfigurationBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of infinispan-client-rest-jakarta Show documentation
Show all versions of infinispan-client-rest-jakarta Show documentation
Infinispan REST Client Jakarta
package org.infinispan.client.rest.configuration;
import org.infinispan.commons.configuration.Builder;
import org.infinispan.commons.configuration.Combine;
import org.infinispan.commons.configuration.attributes.AttributeSet;
/**
* SecurityConfigurationBuilder.
*
* @author Tristan Tarrant
* @since 10.0
*/
public class SecurityConfigurationBuilder extends AbstractConfigurationChildBuilder implements
Builder {
private final AuthenticationConfigurationBuilder authentication = new AuthenticationConfigurationBuilder(this);
private final SslConfigurationBuilder ssl = new SslConfigurationBuilder(this);
SecurityConfigurationBuilder(RestClientConfigurationBuilder builder) {
super(builder);
}
@Override
public AttributeSet attributes() {
return AttributeSet.EMPTY;
}
public AuthenticationConfigurationBuilder authentication() {
return authentication;
}
public SslConfigurationBuilder ssl() {
return ssl;
}
@Override
public SecurityConfiguration create() {
return new SecurityConfiguration(authentication.create(), ssl.create());
}
@Override
public Builder> read(SecurityConfiguration template, Combine combine) {
authentication.read(template.authentication(), combine);
ssl.read(template.ssl(), combine);
return this;
}
@Override
public void validate() {
authentication.validate();
ssl.validate();
}
RestClientConfigurationBuilder getBuilder() {
return super.builder;
}
}