From: jec@isoft.isoft.com (Jonathan Chinitz)
Subject: Re: OSF-DCE: 2 interfaces at the same time?
Date: 30 Aug 94 00:39:26 GMT [thread overview]
Message-ID: <389@isoft.isoft.com> (raw)
In-Reply-To: 33s2i5$7va@gmdzi.gmd.de
In article <33s2i5$7va@gmdzi.gmd.de>, lux@gmdzi.gmd.de (Wolfgang Lux) writes:
> can an object possess 2 interfaces, i.e. 2 responsible type
> managers, at the same time?
>
> idea:
> an object has a
> - type-specific interface, f.i. enter_date, and at the same time
> - a type-independent interface, f.i. get_usage_info.
>
> the type manager implementing the type-independent interface is
> attached to every object in addition to the type-specific manager.
>
> Wolfgang Lux
Sure!
You assign a manager type uuid to each manager type, and register the
interface twice: once with each manager type. Then you assign an
object uuid to each manager type and make that visible to the client,
either thru the namespace entry or in the client code as a constant.
Your calling sequence is:
uuid_create (mgr-type1, st)
uuid_create (mgr-type2, st)
rpc_object_set_type(obj1, mgr-type1, st)
rpc_object_set_type(obj2, mgr-type2, st)
rpc_server_register_if(if, mgr-type1, mgr_epv1, st)
rpc_server_register_if(if, mgr-type2, mgr_epv2, st)
When you call rpc foo() on interface if, you set the object uuid in
the binding handle either by calling rpc_binding_set_object() or by
importing the binding from CDS and passing the object uuid in the call
to rpc_ns_binding_import_begin(). Depending on the object, the manager
code that will get executed will be either (*mgr_epv1->foo)() or
(*mgr_epv2->foo)().
If you want a default behaviour, then make a third register_if call
with mgr-type == NULL. Bindings that have no object will always
execute in the default mgr epv.
Jonathan
--
Jonathan Chinitz E-mail: jec@isoft.com
IntelliSoft Corp. Tel.: 508-635-9070
Distributed Computing Solutions Fax: 508-635-9210
P.O. Box 2645, Acton, MA 01720
prev parent reply other threads:[~1994-08-30 0:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-08-29 7:25 OSF-DCE: 2 interfaces at the same time? Wolfgang Lux
1994-08-29 13:22 ` Yuh Ming YONG
1994-08-30 0:39 ` Jonathan Chinitz [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox