I understand that in UNO (and COM, and CORBA...) the programmer can
"inspect" or "interrogate" the components in order to find ways to
communicate ("send messages") to them.

The OpenOffice process can be run in either (a) named-pipe mode, or
(b) listening to some particular socket mode. According to all the
code I have seen, the programmer has to know those details in advance.
IOW, if my program is going to connect the OO server via socket 8100
(some sort of convention), it has to be started like this:

"C:\Program Files\OpenOffice.org 2.3\program\soffice" -accept=socket,host=0,port=8100;urp;

The server has to be started to accommodate my code, and think it
should be the other way around. I would like my client program to be
as general and flexible as possible. If I understand component-based
programming, I don't have to know a lot of stuff in advance, because
the components themselves will provide the details. I just don't know
what the correct "questions" are.

These are the first 5 lines of a typical OO client program (not drawn
to scale!):

(1) xContext = Bootstrap.bootstrap(); // starts OO process (plus Windows icon) if not already running
(2) XMultiComponentFactory xMCF = xContext.getServiceManager();
(3) createInstanceWithContext("com.sun.star.bridge.BridgeFactory");
(4) xConnector = UnoRuntime.queryInterface(XConnector.class, x);
(5) connection = xConnector.connect(con); <-- finally!, there is TCP/IP communication here

where 'con' can be something like: "socket,host=localhost,port=8100"
or "pipe,name=whatever".

Notice that it is not only after step (4) that finally a regular TCP/
IP connection is established. How do they talk in steps (2-4)? Beats
me, I am sure is not telegraph or smoke signals, the point is that
there is some sort of communication going on. In fact, does anyone
know how they solve this chicken-and-egg issue?

But let's go to the...

Main Question:

Can I insert some statement between steps (4) and (5) in which I ask
the OO server: what kind of IPC mode are you using: named pipe or
socket? If pipe: what is the name of the pipe? If socket, what socket
number are you using?

-Ramon

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to