Provider对象得到 ClientTransportConfig

@param providerInfo Provider
@return ClientTransportConfig
510705
protected ClientTransportConfig providerToClientConfig(ProviderInfo providerInfo) {
        return new ClientTransportConfig()
            .setConsumerConfig(consumerConfig)
            .setProviderInfo(providerInfo)
            .setContainer(consumerConfig.getProtocol())
            .setConnectTimeout(consumerConfig.getConnectTimeout())
            .setInvokeTimeout(consumerConfig.getTimeout())
            .setDisconnectTimeout(consumerConfig.getDisconnectTimeout())
            .setConnectionNum(consumerConfig.getConnectionNum())
            .setChannelListeners(consumerConfig.getOnConnect());
    }
499571
public static ProviderList newList(Provider ... providers) {
        ProviderConfig[] configs = new ProviderConfig[providers.length];
        for (int i = 0; i < providers.length; i++) {
            configs[i] = new ProviderConfig(providers[i]);
        }
        return new ProviderList(configs, true);
    }
112656
public static boolean isProvider(ClassInfo classInfo) {
        AnnotationInfo annotationInfo = classInfo.getAnnotation(JaxWsConstants.WEB_SERVICE_ANNOTATION_NAME);
        if (annotationInfo == null) {
            annotationInfo = classInfo.getAnnotation(JaxWsConstants.WEB_SERVICE_PROVIDER_ANNOTATION_NAME);
            if (annotationInfo != null) {
                return true;
            }
        }
        return false;
    }
682141
private AuthConfigProvider getAuthConfigProvider(String appContext) {
        AuthConfigProvider provider = null;
        AuthConfigFactory providerFactory = getAuthConfigFactory();
        if (providerFactory != null) {
            if (providerConfigModified &&
                providerFactory instanceof ProviderRegistry) {
                ((ProviderRegistry) providerFactory).setProvider(jaspiProviderServiceRef.getService());
                providerConfigModified = false;
            }
            provider = providerFactory.getConfigProvider("HttpServlet", appContext, (RegistrationListener) null);
        }
        return provider;
    }
458399
public ProviderGroup add(ProviderInfo providerInfo) {
        if (providerInfo == null) {
            return this;
        }
        ConcurrentHashSet<ProviderInfo> tmp = new ConcurrentHashSet<ProviderInfo>(providerInfos);
        tmp.add(providerInfo); // 排重
        this.providerInfos = new ArrayList<ProviderInfo>(tmp);
        return this;
    }
260218
public static ClientTransport getReverseClientTransport(String container, AbstractChannel channel) {
        if (REVERSE_CLIENT_TRANSPORT_MAP == null) { // 初始化
            synchronized (ClientTransportFactory.class) {
                if (REVERSE_CLIENT_TRANSPORT_MAP == null) {
                    REVERSE_CLIENT_TRANSPORT_MAP = new ConcurrentHashMap<String, ClientTransport>();
                }
            }
        }
        String key = NetUtils.channelToString(channel.remoteAddress(), channel.localAddress());
        ClientTransport transport = REVERSE_CLIENT_TRANSPORT_MAP.get(key);
        if (transport == null) {
            synchronized (ClientTransportFactory.class) {
                transport = REVERSE_CLIENT_TRANSPORT_MAP.get(key);
                if (transport == null) {
                    ClientTransportConfig config = new ClientTransportConfig()
                        .setProviderInfo(new ProviderInfo().setHost(channel.remoteAddress().getHostName())
                            .setPort(channel.remoteAddress().getPort()))
                        .setContainer(container);
                    transport = ExtensionLoaderFactory.getExtensionLoader(ClientTransport.class)
                        .getExtension(config.getContainer(),
                            new Class[] { ClientTransportConfig.class },
                            new Object[] { config });
                    transport.setChannel(channel);
                    REVERSE_CLIENT_TRANSPORT_MAP.put(key, transport); // 保存唯一长连接
                }
            }
        }
        return transport;
    }
389368
function(config) {
    var transport;
    if (config.wifi) {
      transport = new WiFiTransport({
        configuration: config.wifi
      });
    } else if (config.ethernet) {
      transport = new EthernetTransport({
        configuration: config.ethernet
      });
    } else if (config.ble) {
      transport = new BLETransport({
        configuration: config.ble
      });
    } else if (config.serial) {
      transport = new SerialTransport({
        configuration: config.serial
      });
    } else {
      throw new Error("Must specify a valid connection type");
    }
    return transport;
  }
125454
public static CloudBigtableScanConfiguration BuildExportConfig(ExportOptions options) {
    ValueProvider<ReadRowsRequest> request = new RequestValueProvider(options);
    CloudBigtableScanConfiguration.Builder configBuilder =
        new CloudBigtableScanConfiguration.Builder()
            .withProjectId(options.getBigtableProject())
            .withInstanceId(options.getBigtableInstanceId())
            .withTableId(options.getBigtableTableId())
            .withAppProfileId(options.getBigtableAppProfileId())
            .withRequest(request);

    return configBuilder.build();
  }
1186958
static List<Instance> convertProviderToInstances(ProviderConfig providerConfig) {
        @SuppressWarnings("unchecked")
        List<ServerConfig> servers = providerConfig.getServer();
        if (servers != null && !servers.isEmpty()) {
            List<Instance> instances = new ArrayList<Instance>();
            for (ServerConfig server : servers) {
                Instance instance = new Instance();
                instance.setClusterName(DEFAULT_CLUSTER);
                instance.setServiceName(providerConfig.getInterfaceId());

                // set host port
                String host = server.getVirtualHost();
                if (host == null) {
                    host = server.getHost();
                    if (NetUtils.isLocalHost(host) || NetUtils.isAnyHost(host)) {
                        host = SystemInfo.getLocalHost();
                    }
                }
                instance.setIp(host);
                instance.setPort(server.getPort());

                // set meta data
                Map<String, String> metaData = RegistryUtils.convertProviderToMap(providerConfig, server);
                instance.setMetadata(metaData);

                instances.add(instance);
            }
            return instances;
        }
        return null;
    }
142560
public static IClientConfig getNamedConfig(String name, Class<? extends IClientConfig> clientConfigClass) {
        return getNamedConfig(name, factoryFromConfigType(clientConfigClass));
    }
143762
public Transport newTransport(ApitraryApi apitraryApi) {
		List<Class<Transport>> knownTransports = getAvailableTransports();
		if (knownTransports.isEmpty()) {
			throw new ApiTransportException("No transport provider available. Is there one on the classpath?");
		}
		return newTransport(apitraryApi, knownTransports.get(knownTransports.size() - 1));
	}
146724
private static ClientConfig createCOSClientConfig(String regionName,
      UnderFileSystemConfiguration conf) {
    ClientConfig config = new ClientConfig(new Region(regionName));
    config.setConnectionTimeout((int) conf.getMs(PropertyKey.COS_CONNECTION_TIMEOUT));
    config.setSocketTimeout((int) conf.getMs(PropertyKey.COS_SOCKET_TIMEOUT));
    config.setMaxConnectionsCount(conf.getInt(PropertyKey.COS_CONNECTION_MAX));
    return config;
  }
385104
public static ServerConfiguration loadConfiguration() {
        final ServerConfiguration configuration = createConfiguration();
        Assert.requireNonNull(configuration, "configuration");

        final ServiceLoader<ConfigurationProvider> serviceLoader = ServiceLoader.load(ConfigurationProvider.class);
        for(final ConfigurationProvider provider : serviceLoader) {
            final Map<String, String> additionalStringProperties = provider.getStringProperties();
            for(final Map.Entry<String, String> property : additionalStringProperties.entrySet()) {
                if(!configuration.containsProperty(property.getKey())) {
                    configuration.setProperty(property.getKey(), property.getValue());
                }
            }
            final Map<String, List<String>> additionalListProperties = provider.getListProperties();
            for(final Map.Entry<String, List<String>> property : additionalListProperties.entrySet()) {
                if(!configuration.containsProperty(property.getKey())) {
                    configuration.setListProperty(property.getKey(), property.getValue());
                }
            }
            final Map<String, Boolean> additionalBooleanProperties = provider.getBooleanProperties();
            for(final Map.Entry<String, Boolean> property : additionalBooleanProperties.entrySet()) {
                if(!configuration.containsProperty(property.getKey())) {
                    configuration.setBooleanProperty(property.getKey(), property.getValue());
                }
            }
            final Map<String, Integer> additionalIntegerProperties = provider.getIntegerProperties();
            for(final Map.Entry<String, Integer> property : additionalIntegerProperties.entrySet()) {
                if(!configuration.containsProperty(property.getKey())) {
                    configuration.setIntProperty(property.getKey(), property.getValue());
                }
            }
            final Map<String, Long> additionalLongProperties = provider.getLongProperties();
            for(final Map.Entry<String, Long> property : additionalLongProperties.entrySet()) {
                if(!configuration.containsProperty(property.getKey())) {
                    configuration.setLongProperty(property.getKey(), property.getValue());
                }
            }
        }
        LOG.debug("Configuration created with {} properties", configuration.getPropertyKeys().size());
        if(LOG.isTraceEnabled()) {
            for(final String key : configuration.getPropertyKeys()) {
                LOG.debug("Dolphin Platform configured with '{}'='{}'", key, configuration.getProperty(key, null));
            }
        }

        return configuration;
    }
1309549
public static WebsocketClientTransport create(int port) {
    TcpClient client = TcpClient.create().port(port);
    return create(client);
  }
1273433
@SuppressWarnings("deprecation")
	ServerConfig buildServerConfig() {
		vallidateServerConfig();
		final int serverPort = SimpleOptional.ofNullable(port).orElse(transportStrategy.getDefaultServerPort());
		return new ServerConfigImpl(assumeNonNull(getHost()), serverPort, getUsername(), getPassword());
	}
345104
public static ServerTransport getServerTransport(ServerTransportConfig serverConfig) {
        ServerTransport serverTransport = ExtensionLoaderFactory.getExtensionLoader(ServerTransport.class)
            .getExtension(serverConfig.getContainer(),
                new Class[] { ServerTransportConfig.class },
                new Object[] { serverConfig });
        if (serverTransport != null) {
            String key = Integer.toString(serverConfig.getPort());
            SERVER_TRANSPORT_MAP.put(key, serverTransport);
        }
        return serverTransport;
    }
1257102
@Provides
  @ResourceOneFeature
  BeadledomClientConfiguration provideClientConfig() {
    return BeadledomClientConfiguration.builder()
        .maxPooledPerRouteSize(60)
        .socketTimeoutMillis(60)
        .connectionTimeoutMillis(60)
        .ttlMillis(60)
        .connectionPoolSize(60).build();
  }