@Test public void testGetProxy() { DatadogHttpClient client = new DatadogHttpClient("anApiKey", "localhost", 123); assertTrue(client.getProxy().address() instanceof InetSocketAddress); InetSocketAddress proxyAddress = (InetSocketAddress) client.getProxy().address(); assertEquals(123, proxyAddress.getPort()); assertEquals("localhost", proxyAddress.getHostString()); }
Proxy getProxy() { if (proxyHost == null) { return Proxy.NO_PROXY; } else { return new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyHost, proxyPort)); } }
DatadogHttpClient { Proxy getProxy() { if (proxyHost == null) { return Proxy.NO_PROXY; } else { return new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyHost, proxyPort)); } } }
DatadogHttpClient { Proxy getProxy() { if (proxyHost == null) { return Proxy.NO_PROXY; } else { return new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyHost, proxyPort)); } } DatadogHttpClient(String dgApiKey, String dgProxyHost, int dgProxyPort); }
DatadogHttpClient { Proxy getProxy() { if (proxyHost == null) { return Proxy.NO_PROXY; } else { return new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyHost, proxyPort)); } } DatadogHttpClient(String dgApiKey, String dgProxyHost, int dgProxyPort); void send(DatadogHttpReporter.DatadogHttpRequest request); static String serialize(Object obj); void close(); }
DatadogHttpClient { Proxy getProxy() { if (proxyHost == null) { return Proxy.NO_PROXY; } else { return new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyHost, proxyPort)); } } DatadogHttpClient(String dgApiKey, String dgProxyHost, int dgProxyPort); void send(DatadogHttpReporter.DatadogHttpRequest request); static String serialize(Object obj); void close();  }