I am using HttpsURLConnection in Java and through some sort of loop i am creating 10 connections which later on used by different threads inside my program.
HttpsURLConnection connection = null;
connection = (HttpsURLConnection) url.openConnection();
Wondering how can i know which connection is used by current thread. I Just need some unique identifier of the connection.
Some thing like,
System.out.println(connection);
But above System.out statement is printing pretty generic server name. Not the hash code of connection object.
Wondering how can i do that?