/** * Establishes and returns a new connection to the given node. The connection is NOT maintained by this service, it's the callers * responsibility to close the connection once it goes out of scope. * @param node the node to connect to * @param connectionProfile the connection profile to use */ public Transport.Connection openConnection(final DiscoveryNode node, ConnectionProfile connectionProfile) throws IOException { if (isLocalNode(node)) { return localNodeConnection; } else { return connectionManager.openConnection(node, connectionProfile); } }
final TransportService.HandshakeResponse handshakeResponse; ConnectionProfile profile = ConnectionProfile.buildSingleChannelProfile(TransportRequestOptions.Type.REG); Transport.Connection connection = manager.openConnection(seedNode, profile); boolean success = false; try {
/** * Establishes and returns a new connection to the given node. The connection is NOT maintained by this service, it's the callers * responsibility to close the connection once it goes out of scope. * @param node the node to connect to * @param connectionProfile the connection profile to use */ public Transport.Connection openConnection(final DiscoveryNode node, ConnectionProfile connectionProfile) throws IOException { if (isLocalNode(node)) { return localNodeConnection; } else { return connectionManager.openConnection(node, connectionProfile); } }
/** * Establishes and returns a new connection to the given node. The connection is NOT maintained by this service, it's the callers * responsibility to close the connection once it goes out of scope. * @param node the node to connect to * @param profile the connection profile to use */ public Transport.Connection openConnection(final DiscoveryNode node, ConnectionProfile profile) throws IOException { if (isLocalNode(node)) { return localNodeConnection; } else { return transport.openConnection(node, profile); } }
proxyAddress); final TransportService.HandshakeResponse handshakeResponse; Transport.Connection connection = manager.openConnection(seedNode, ConnectionProfile.buildSingleChannelProfile(TransportRequestOptions.Type.REG, null, null)); boolean success = false;
final DiscoveryNode seedNode = seedNodes.next(); final TransportService.HandshakeResponse handshakeResponse; Transport.Connection connection = transportService.openConnection(seedNode, ConnectionProfile.buildSingleChannelProfile(TransportRequestOptions.Type.REG, null, null)); boolean success = false;