@Test public void testBrokerListWithHeaders() { List<String> brokers = new ArrayList<>(); brokers.add("127.0.0.1:1234"); brokers.add("localhost:2345"); Map<String, String> headers = new HashMap<>(); headers.put("Caller", "curl"); Connection connection = ConnectionFactory.fromHostList(brokers, headers); Assert.assertEquals(connection.getBrokerList(), brokers); }
public static Connection fromHostList(String... brokers) { return new Connection(Arrays.asList(brokers), _transportFactory.buildTransport(null)); }
ConnectionFactory { public static Connection fromHostList(String... brokers) { return new Connection(Arrays.asList(brokers), _transportFactory.buildTransport(null)); } }
ConnectionFactory { public static Connection fromHostList(String... brokers) { return new Connection(Arrays.asList(brokers), _transportFactory.buildTransport(null)); } private  ConnectionFactory(); }
ConnectionFactory { public static Connection fromHostList(String... brokers) { return new Connection(Arrays.asList(brokers), _transportFactory.buildTransport(null)); } private  ConnectionFactory(); static Connection fromZookeeper(String zkUrl); static Connection fromProperties(Properties properties); static Connection fromHostList(String... brokers); static Connection fromHostList(List<String> brokers, Map<String, String> headers); }
ConnectionFactory { public static Connection fromHostList(String... brokers) { return new Connection(Arrays.asList(brokers), _transportFactory.buildTransport(null)); } private  ConnectionFactory(); static Connection fromZookeeper(String zkUrl); static Connection fromProperties(Properties properties); static Connection fromHostList(String... brokers); static Connection fromHostList(List<String> brokers, Map<String, String> headers);  }