use of services.moleculer.transporter.tcp.RemoteAddress in project moleculer-java by moleculer-java.
the class Transporter method getAddress.
// --- GET SOCKET ADDRESS OF A NODE ---
public RemoteAddress getAddress(String nodeID) {
NodeDescriptor node = nodes.get(nodeID);
if (node == null) {
return null;
}
RemoteAddress address;
node.readLock.lock();
try {
address = new RemoteAddress(node.host, node.port);
} finally {
node.readLock.unlock();
}
return address;
}
Aggregations