Search in sources :

Example 1 with SslClientConfig

use of com.navercorp.pinpoint.grpc.security.SslClientConfig in project pinpoint by naver.

the class DefaultChannelFactoryBuilder method build.

@Override
public ChannelFactory build() {
    logger.info("build ChannelFactory:{}", factoryName);
    Objects.requireNonNull(headerFactory, "headerFactory");
    Objects.requireNonNull(clientOption, "clientOption");
    SslClientConfig sslClientConfig = SslClientConfig.DISABLED_CONFIG;
    if (sslOption != null && sslOption.isEnable()) {
        String providerType = sslOption.getProviderType();
        Resource trustCertResource = sslOption.getTrustCertResource();
        sslClientConfig = new SslClientConfig(true, providerType, trustCertResource);
    }
    return new DefaultChannelFactory(factoryName, executorQueueSize, headerFactory, nameResolverProvider, clientOption, sslClientConfig, clientInterceptorList);
}
Also used : SslClientConfig(com.navercorp.pinpoint.grpc.security.SslClientConfig) Resource(com.navercorp.pinpoint.grpc.util.Resource)

Aggregations

SslClientConfig (com.navercorp.pinpoint.grpc.security.SslClientConfig)1 Resource (com.navercorp.pinpoint.grpc.util.Resource)1