use of org.neo4j.internal.helpers.HostnamePort in project neo4j by neo4j.
the class WebContainerTestUtils method verifyConnector.
public static void verifyConnector(GraphDatabaseService db, String name, boolean enabled) {
HostnamePort address = connectorAddress(db, name);
if (enabled) {
assertNotNull(address);
assertTrue(canConnectToSocket(address.getHost(), address.getPort()));
} else {
assertNull(address);
}
}
use of org.neo4j.internal.helpers.HostnamePort in project neo4j by neo4j.
the class BoltIT method assertEventuallyServerResponds.
private void assertEventuallyServerResponds(String host, int port) throws Exception {
SocketConnection conn = new SocketConnection();
conn.connect(new HostnamePort(host, port));
conn.send(new byte[] { (byte) 0x60, (byte) 0x60, (byte) 0xB0, (byte) 0x17, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 });
assertThat(conn.recv(4)).isEqualTo(new byte[] { 0, 0, 0, 4 });
}
use of org.neo4j.internal.helpers.HostnamePort in project neo4j by neo4j.
the class ConnectorPortRegister method register.
private void register(String connectorKey, String hostname, int port) {
HostnamePort hostnamePort = new HostnamePort(hostname, port);
connectorsInfo.put(connectorKey, hostnamePort);
}
Aggregations