XUnoUrlResolver.resolve : how to setup a timeout ?

Creating a macro - Writing a Script - Using the API

XUnoUrlResolver.resolve : how to setup a timeout ?

Postby RichardT » Fri Nov 03, 2017 3:32 am

Hello,

I use the UNO API in Java for a while and I'm trying to finish an OpenOffice connector that is sufficiently stable.
By testing my code, I was creating a fake listening process using netcat, just to simulate an already bound TCP port.

When this code is executing and trying to connect to my netcat process listening on port 8100, the resolve() method never replies !

Code: Select all   Expand viewCollapse view
String unoConnectString = "uno:socket,host=localhost,port=8100;urp;StarOffice.ComponentContext";
Object context = xUrlResolver.resolve(oooConnectionString);


This code try to connect to my netcat process listening on port 8100, which never replies to any request. The resolve() method did not reply or throw an exception, and doesn't seam to have any timeout...
Is there a way to know that we are trying to connect to a not responding process instead of a regular and responding soffice process ?

Thank you very much for your answer.
Best regards.
OpenOffice 4.1 on Windows and Linux
RichardT
 
Posts: 1
Joined: Fri Nov 03, 2017 3:15 am

Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 8 guests