public static Socket initializeSocket() throws UnknownHostException, IOException { ObjectPool socketPool = new SocketPool(hostname, port); return (Socket) socketPool.checkOut(); }
public static Socket initializeSocket( boolean mode ) {  Socket aSocket = null; try { aSocket = initializeSocket(); } catch (UnknownHostException e) { errorHandling(G2GuiResources.getString("G2_INVALID_ADDRESS"), G2GuiResources.getString("G2_ILLEGAL_ADDRESS"), mode, true); return null; } catch (IOException e) { errorHandling(G2GuiResources.getString("G2_IOEXCEPTION"), G2GuiResources.getString("G2_CORE_NOT_RUNNING") + hostname + ":" + port + G2GuiResources.getString("G2_CORE_NOT_RUNNING2"), mode, true); return null; } return aSocket; }
    public static Socket initializeSocket() throws UnknownHostException, IOException {   		ObjectPool socketPool = new SocketPool(hostname, port);   		return (Socket) socketPool.checkOut();    }