XUnoUrlResolver.resolve : how to setup a timeout ?

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
RichardT
Posts: 1
Joined: Fri Nov 03, 2017 3:15 am

XUnoUrlResolver.resolve : how to setup a timeout ?

Post by RichardT »

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

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
Post Reply