Rainman Lee wrote:

> hello everyone,
> I have a question about extending a published service.
> supposing that there is a published service S, which derives from a
> Multi-Inheritance Interface C, which inherits from A and B, like that:
> interface A
> {
> ...
> };
> 
> interface B
> {
> ...
> };
> 
> interface C
> {
>    interface A;
>    interface B;
> };
> 
> service S : C;
> 
> and the service S is published.
> now I want to make the service S suppot a new interface D, how can I
> archieve this while guaranteeing that old programs using service S
> still works?
> I know that the easiest way maybe implementing a service S1, and let
> this service supporting both the interface C and D.
> then new programs using interface D query S1, and the existing
> programs still query the service S.
> is there any other method to accomplish this? I want to new programs
> can access the interface D still through S instead of S1, S1 is not a
> friendly name I think ;@)
> thank you very much!

If the implementation of service S1 also implements service S, all
clients using the service S will be able to use the additional interface
D by using queryInterface on the reference to interface C they got by
creating service S. Though I don't understand why new programs shouldn't
be able to use "S1".

Ciao,
Mathias

-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "[EMAIL PROTECTED]".
I use it for the OOo lists and only rarely read other mails sent to it.

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

Reply via email to