test_class.declarator: webClientFactory
test_class.modifier: private
test_class.original_string: private WebClientFactoryImpl webClientFactory;
test_class.type: WebClientFactoryImpl
test_class.var_name: webClientFactory
test_class.declarator: TEST_URL = "https://www.eclipse.org/"
test_class.modifier: private static final
test_class.original_string: private static final String TEST_URL = "https://www.eclipse.org/";
test_class.type: String
test_class.var_name: TEST_URL
test_class.declarator: extensibleTrustManager
test_class.modifier: private @Mock
test_class.original_string: private @Mock ExtensibleTrustManagerImpl extensibleTrustManager;
test_class.type: ExtensibleTrustManagerImpl
test_class.var_name: extensibleTrustManager
test_class.file: bundles/org.openhab.core.io.net/src/test/java/org/openhab/core/io/net/http/internal/WebClientFactoryImplTest.java
test_class.identifier: WebClientFactoryImplTest
test_case.body: @Disabled("connecting to the outside world makes this test flaky")
      @Test
      public void testCommonClientUsesExtensibleTrustManagerFailure() throws Throwable {
          doThrow(new CertificateException()).when(extensibleTrustManager).checkServerTrusted(
                  ArgumentMatchers.any(X509Certificate[].class), anyString(), ArgumentMatchers.any(SSLEngine.class));
          HttpClient httpClient = webClientFactory.getCommonHttpClient();
  
          assertThrows(SSLHandshakeException.class, () -> {
              try {
                  httpClient.GET(TEST_URL);
              } catch (ExecutionException e) {
                  throw e.getCause();
              }
          });
      }
test_case.class_method_signature: WebClientFactoryImplTest.testCommonClientUsesExtensibleTrustManagerFailure()
test_case.full_signature: @Disabled("connecting to the outside world makes this test flaky") @Test public void testCommonClientUsesExtensibleTrustManagerFailure()
test_case.identifier: testCommonClientUsesExtensibleTrustManagerFailure
test_case.invocations: checkServerTrusted when doThrow any anyString any getCommonHttpClient assertThrows GET getCause
test_case.modifiers: @Disabled("connecting to the outside world makes this test flaky") @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCommonClientUsesExtensibleTrustManagerFailure()
focal_class.declarator: logger = LoggerFactory.getLogger(WebClientFactoryImpl.class)
focal_class.modifier: private final
focal_class.original_string: private final Logger logger = LoggerFactory.getLogger(WebClientFactoryImpl.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: CONFIG_MIN_THREADS_SHARED = "minThreadsShared"
focal_class.modifier: private static final
focal_class.original_string: private static final String CONFIG_MIN_THREADS_SHARED = "minThreadsShared";
focal_class.type: String
focal_class.var_name: CONFIG_MIN_THREADS_SHARED
focal_class.declarator: CONFIG_MAX_THREADS_SHARED = "maxThreadsShared"
focal_class.modifier: private static final
focal_class.original_string: private static final String CONFIG_MAX_THREADS_SHARED = "maxThreadsShared";
focal_class.type: String
focal_class.var_name: CONFIG_MAX_THREADS_SHARED
focal_class.declarator: CONFIG_KEEP_ALIVE_SHARED = "keepAliveTimeoutShared"
focal_class.modifier: private static final
focal_class.original_string: private static final String CONFIG_KEEP_ALIVE_SHARED = "keepAliveTimeoutShared";
focal_class.type: String
focal_class.var_name: CONFIG_KEEP_ALIVE_SHARED
focal_class.declarator: CONFIG_MIN_THREADS_CUSTOM = "minThreadsCustom"
focal_class.modifier: private static final
focal_class.original_string: private static final String CONFIG_MIN_THREADS_CUSTOM = "minThreadsCustom";
focal_class.type: String
focal_class.var_name: CONFIG_MIN_THREADS_CUSTOM
focal_class.declarator: CONFIG_MAX_THREADS_CUSTOM = "maxThreadsCustom"
focal_class.modifier: private static final
focal_class.original_string: private static final String CONFIG_MAX_THREADS_CUSTOM = "maxThreadsCustom";
focal_class.type: String
focal_class.var_name: CONFIG_MAX_THREADS_CUSTOM
focal_class.declarator: CONFIG_KEEP_ALIVE_CUSTOM = "keepAliveTimeoutCustom"
focal_class.modifier: private static final
focal_class.original_string: private static final String CONFIG_KEEP_ALIVE_CUSTOM = "keepAliveTimeoutCustom";
focal_class.type: String
focal_class.var_name: CONFIG_KEEP_ALIVE_CUSTOM
focal_class.declarator: MIN_CONSUMER_NAME_LENGTH = 4
focal_class.modifier: private static final
focal_class.original_string: private static final int MIN_CONSUMER_NAME_LENGTH = 4;
focal_class.type: int
focal_class.var_name: MIN_CONSUMER_NAME_LENGTH
focal_class.declarator: MAX_CONSUMER_NAME_LENGTH = 20
focal_class.modifier: private static final
focal_class.original_string: private static final int MAX_CONSUMER_NAME_LENGTH = 20;
focal_class.type: int
focal_class.var_name: MAX_CONSUMER_NAME_LENGTH
focal_class.declarator: CONSUMER_NAME_PATTERN = Pattern.compile("[a-zA-Z0-9_\\-]*")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern CONSUMER_NAME_PATTERN = Pattern.compile("[a-zA-Z0-9_\\-]*");
focal_class.type: Pattern
focal_class.var_name: CONSUMER_NAME_PATTERN
focal_class.declarator: extensibleTrustManager
focal_class.modifier: private final
focal_class.original_string: private final ExtensibleTrustManager extensibleTrustManager;
focal_class.type: ExtensibleTrustManager
focal_class.var_name: extensibleTrustManager
focal_class.declarator: threadPool
focal_class.modifier: private @NonNullByDefault({})
focal_class.original_string: private @NonNullByDefault({}) QueuedThreadPool threadPool;
focal_class.type: QueuedThreadPool
focal_class.var_name: threadPool
focal_class.declarator: commonHttpClient
focal_class.modifier: private @NonNullByDefault({})
focal_class.original_string: private @NonNullByDefault({}) HttpClient commonHttpClient;
focal_class.type: HttpClient
focal_class.var_name: commonHttpClient
focal_class.declarator: commonWebSocketClient
focal_class.modifier: private @NonNullByDefault({})
focal_class.original_string: private @NonNullByDefault({}) WebSocketClient commonWebSocketClient;
focal_class.type: WebSocketClient
focal_class.var_name: commonWebSocketClient
focal_class.declarator: minThreadsShared
focal_class.modifier: private
focal_class.original_string: private int minThreadsShared;
focal_class.type: int
focal_class.var_name: minThreadsShared
focal_class.declarator: maxThreadsShared
focal_class.modifier: private
focal_class.original_string: private int maxThreadsShared;
focal_class.type: int
focal_class.var_name: maxThreadsShared
focal_class.declarator: keepAliveTimeoutShared
focal_class.modifier: private
focal_class.original_string: private int keepAliveTimeoutShared;
focal_class.type: int
focal_class.var_name: keepAliveTimeoutShared
focal_class.declarator: minThreadsCustom
focal_class.modifier: private
focal_class.original_string: private int minThreadsCustom;
focal_class.type: int
focal_class.var_name: minThreadsCustom
focal_class.declarator: maxThreadsCustom
focal_class.modifier: private
focal_class.original_string: private int maxThreadsCustom;
focal_class.type: int
focal_class.var_name: maxThreadsCustom
focal_class.declarator: keepAliveTimeoutCustom
focal_class.modifier: private
focal_class.original_string: private int keepAliveTimeoutCustom;
focal_class.type: int
focal_class.var_name: keepAliveTimeoutCustom
focal_class.file: bundles/org.openhab.core.io.net/src/main/java/org/openhab/core/io/net/http/internal/WebClientFactoryImpl.java
focal_class.identifier: WebClientFactoryImpl
focal_class.interfaces: implements HttpClientFactory, WebSocketFactory
focal_class.class_method_signature: WebClientFactoryImpl.WebClientFactoryImpl(final @Reference ExtensibleTrustManager extensibleTrustManager)
focal_class.full_signature: @Activate public  WebClientFactoryImpl(final @Reference ExtensibleTrustManager extensibleTrustManager)
focal_class.identifier: WebClientFactoryImpl
focal_class.modifiers: @Activate public
focal_class.parameters: (final @Reference ExtensibleTrustManager extensibleTrustManager)
focal_class.signature:  WebClientFactoryImpl(final @Reference ExtensibleTrustManager extensibleTrustManager)
focal_class.class_method_signature: WebClientFactoryImpl.activate(Map<String, Object> parameters)
focal_class.full_signature: @Activate protected void activate(Map<String, Object> parameters)
focal_class.identifier: activate
focal_class.modifiers: @Activate protected
focal_class.parameters: (Map<String, Object> parameters)
focal_class.return: void
focal_class.signature: void activate(Map<String, Object> parameters)
focal_class.class_method_signature: WebClientFactoryImpl.modified(Map<String, Object> parameters)
focal_class.full_signature: @Modified protected void modified(Map<String, Object> parameters)
focal_class.identifier: modified
focal_class.modifiers: @Modified protected
focal_class.parameters: (Map<String, Object> parameters)
focal_class.return: void
focal_class.signature: void modified(Map<String, Object> parameters)
focal_class.class_method_signature: WebClientFactoryImpl.deactivate()
focal_class.full_signature: @Deactivate protected void deactivate()
focal_class.identifier: deactivate
focal_class.modifiers: @Deactivate protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void deactivate()
focal_class.class_method_signature: WebClientFactoryImpl.createHttpClient(String consumerName)
focal_class.full_signature: @Override public HttpClient createHttpClient(String consumerName)
focal_class.identifier: createHttpClient
focal_class.modifiers: @Override public
focal_class.parameters: (String consumerName)
focal_class.return: HttpClient
focal_class.signature: HttpClient createHttpClient(String consumerName)
focal_class.class_method_signature: WebClientFactoryImpl.createWebSocketClient(String consumerName)
focal_class.full_signature: @Override public WebSocketClient createWebSocketClient(String consumerName)
focal_class.identifier: createWebSocketClient
focal_class.modifiers: @Override public
focal_class.parameters: (String consumerName)
focal_class.return: WebSocketClient
focal_class.signature: WebSocketClient createWebSocketClient(String consumerName)
focal_class.class_method_signature: WebClientFactoryImpl.getCommonHttpClient()
focal_class.full_signature: @Override public HttpClient getCommonHttpClient()
focal_class.identifier: getCommonHttpClient
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: HttpClient
focal_class.signature: HttpClient getCommonHttpClient()
focal_class.class_method_signature: WebClientFactoryImpl.getCommonWebSocketClient()
focal_class.full_signature: @Override public WebSocketClient getCommonWebSocketClient()
focal_class.identifier: getCommonWebSocketClient
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: WebSocketClient
focal_class.signature: WebSocketClient getCommonWebSocketClient()
focal_class.class_method_signature: WebClientFactoryImpl.getConfigParameters(Map<String, Object> parameters)
focal_class.full_signature: private void getConfigParameters(Map<String, Object> parameters)
focal_class.identifier: getConfigParameters
focal_class.modifiers: private
focal_class.parameters: (Map<String, Object> parameters)
focal_class.return: void
focal_class.signature: void getConfigParameters(Map<String, Object> parameters)
focal_class.class_method_signature: WebClientFactoryImpl.getConfigParameter(Map<String, Object> parameters, String parameter, int defaultValue)
focal_class.full_signature: @SuppressWarnings({ "null", "unused" }) private int getConfigParameter(Map<String, Object> parameters, String parameter, int defaultValue)
focal_class.identifier: getConfigParameter
focal_class.modifiers: @SuppressWarnings({ "null", "unused" }) private
focal_class.parameters: (Map<String, Object> parameters, String parameter, int defaultValue)
focal_class.return: int
focal_class.signature: int getConfigParameter(Map<String, Object> parameters, String parameter, int defaultValue)
focal_class.class_method_signature: WebClientFactoryImpl.initialize()
focal_class.full_signature: private synchronized void initialize()
focal_class.identifier: initialize
focal_class.modifiers: private synchronized
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void initialize()
focal_class.class_method_signature: WebClientFactoryImpl.createHttpClientInternal(String consumerName, boolean startClient,
              @Nullable QueuedThreadPool threadPool)
focal_class.full_signature: private HttpClient createHttpClientInternal(String consumerName, boolean startClient,
              @Nullable QueuedThreadPool threadPool)
focal_class.identifier: createHttpClientInternal
focal_class.modifiers: private
focal_class.parameters: (String consumerName, boolean startClient,
              @Nullable QueuedThreadPool threadPool)
focal_class.return: HttpClient
focal_class.signature: HttpClient createHttpClientInternal(String consumerName, boolean startClient,
              @Nullable QueuedThreadPool threadPool)
focal_class.class_method_signature: WebClientFactoryImpl.createWebSocketClientInternal(String consumerName, boolean startClient,
              @Nullable QueuedThreadPool threadPool)
focal_class.full_signature: private WebSocketClient createWebSocketClientInternal(String consumerName, boolean startClient,
              @Nullable QueuedThreadPool threadPool)
focal_class.identifier: createWebSocketClientInternal
focal_class.modifiers: private
focal_class.parameters: (String consumerName, boolean startClient,
              @Nullable QueuedThreadPool threadPool)
focal_class.return: WebSocketClient
focal_class.signature: WebSocketClient createWebSocketClientInternal(String consumerName, boolean startClient,
              @Nullable QueuedThreadPool threadPool)
focal_class.class_method_signature: WebClientFactoryImpl.createThreadPool(String consumerName, int minThreads, int maxThreads,
              int keepAliveTimeout)
focal_class.full_signature: private QueuedThreadPool createThreadPool(String consumerName, int minThreads, int maxThreads,
              int keepAliveTimeout)
focal_class.identifier: createThreadPool
focal_class.modifiers: private
focal_class.parameters: (String consumerName, int minThreads, int maxThreads,
              int keepAliveTimeout)
focal_class.return: QueuedThreadPool
focal_class.signature: QueuedThreadPool createThreadPool(String consumerName, int minThreads, int maxThreads,
              int keepAliveTimeout)
focal_class.class_method_signature: WebClientFactoryImpl.checkConsumerName(String consumerName)
focal_class.full_signature: private void checkConsumerName(String consumerName)
focal_class.identifier: checkConsumerName
focal_class.modifiers: private
focal_class.parameters: (String consumerName)
focal_class.return: void
focal_class.signature: void checkConsumerName(String consumerName)
focal_class.class_method_signature: WebClientFactoryImpl.createSslContextFactory()
focal_class.full_signature: private SslContextFactory createSslContextFactory()
focal_class.identifier: createSslContextFactory
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: SslContextFactory
focal_class.signature: SslContextFactory createSslContextFactory()
focal_method.body: @Override
      public HttpClient getCommonHttpClient() {
          initialize();
          logger.debug("shared http client requested");
          return commonHttpClient;
      }
focal_method.class_method_signature: WebClientFactoryImpl.getCommonHttpClient()
focal_method.full_signature: @Override public HttpClient getCommonHttpClient()
focal_method.identifier: getCommonHttpClient
focal_method.invocations: initialize debug
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: HttpClient
focal_method.signature: HttpClient getCommonHttpClient()