Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
* OSF-DCE: 2 interfaces at the same time?
@ 1994-08-29  7:25 Wolfgang Lux
  1994-08-29 13:22 ` Yuh Ming YONG
  1994-08-30  0:39 ` Jonathan Chinitz
  0 siblings, 2 replies; 3+ messages in thread
From: Wolfgang Lux @ 1994-08-29  7:25 UTC (permalink / raw)


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

-- 
Wolfgang Lux 
German National Research Center for Computer Science (GMD)
P.O. Box 1316 D-53757 St. Augustin
email: wolfgang.lux@gmd.de  fax: +49 2241 142105  tel: +49 2241 142424


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: OSF-DCE: 2 interfaces at the same time?
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Yuh Ming YONG @ 1994-08-29 13:22 UTC (permalink / raw)


> 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


I believe so as long as each object is registered _once_ (using
rpc_object_set_type() ) with the required type-interface. By associating
each object with a type UUID allows the RPC run-time to "route" the
RPC to the designated server (i.e. manager entry point vector).


Yuh Ming


=========================================================================

Yuh Ming, Yong                  Internet: ymyong@neumann.uwaterloo.ca
Department of Computer Science
University of Waterloo
Waterloo, Ontario
Canada N2L 3G1

=========================================================================


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: OSF-DCE: 2 interfaces at the same time?
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Chinitz @ 1994-08-30  0:39 UTC (permalink / raw)


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				


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1994-08-30  0:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox