Code example for HttpHost

Methods: getHostNamegetPortgetSchemeName

0
        assertEquals(100, conn.getSocketTimeout());
    } 
 
    @Test 
    public void testHttpCreateEntry() throws Exception { 
        host = new HttpHost("localhost", serverPort, "http");
        conn = connFactory.create(host);
 
        final BasicPoolEntry entry = pool.createEntry(host, conn);
 
        assertEquals(conn, entry.getConnection());
        assertEquals("localhost", entry.getRoute().getHostName());
 
        entry.close();
    } 
 
} 
Contextual code suggestions in your IDE  Get Codota for Java