// checking if factory is really functional.
USocketFactory.Socket sock = null;
try {
sock = open();
}
catch(IOException e){ throw new AgentProxyException(e.toString()); }
catch(Exception e){ throw new AgentProxyException(e.toString()); }
finally{
try{
if(sock!=null)
sock.close();
}
catch(IOException e){
throw new AgentProxyException(e.toString());
}
}
}