OMT Class Diagrams
I have picked up James Rumbaugh's OMT notation because of its simplicity
and express transparency. It miss some of Java constructs but there is a way
how to work out this absence.
Interfaces are titled with enclosing
'|'s. That means the |Monster|
is name of an interface
and Monster
is name of a class. Therefrom the generalization of an
interface means implementing the interface. And that is all folks !
b.examples.generic
Here is nothing to explain. Counter
serves as a basic for other more
sophisticated samples.

b.examples.idl.counter
Implementing the *Servant
interface makes an object remote.
Thus CounterImpl
implements CounterServant
interface
to be remote and extends b.examples.generic.Counter
to inherit generic counter behavior.
The only operations one can involve remotely are defined in *Operations
interface. Server then publish CounterImpl
to be accesible by others
and Client
do resolve
its remote reference CounterRef
to point to particular remote counter
(published by Server). After doing that, client can call methods of
CounterRef
which are dispatched by IDL mechanism to real remote object.
Note that *Servant
, *Ref
and *Operations
are generated automaticly from IDL definition file.

b.examples.idl.counter - observed
The observed version of remote counter is based on the previous one.
The ObservedCounterImpl
implements ObservedCounterServant
interface to be remotely observable - methods addObserver
and removeObserver
are dispatched
to b.util.idl.RemotelyObservable
object (see link has)
and serves to clients to be able to register and unregister themselfs as remote
observers of this counter.
Next ObservedCounterImpl
extends CounterImpl
to be remote
counter and overides setValue
method to notify all observers about
counter value change by invoking notifyObservers
method
of b.util.idl.RemotelyObservable
class. An instance of this class
then call update
method to all of its observers.
Thus ObserverClient
has to implement
b.util.idl.RemoteObserverServant
interface.

b.examples.rmi.counter
Implementing an interface based on java.rmi.Remote
makes an object
remote (big surprice!). Only methods defined in this interface can be then
invoked remotely.
Thus CounterImpl
implements Counter
interface
to be remote and extends b.examples.generic.Counter
to inherit generic counter behavior.
Server then bind CounterImpl
in the registry to be accesible by others
and Client
look up the registry and resolve
its remote reference Counter
to point to particular remote counter.
After doing that, client can call methods of
Counter
which are dispatched by RMI mechanism to real remote object.

b.examples.rmi.counter - observed
The observed version of remote counter is based on the previous one.
The ObservedCounterImpl
implements ObservedCounter
interface to be remotely observable - methods addObserver
and removeObserver
are dispatched
to b.util.rmi.RemotelyObservable
object (see link has)
and serves to clients to be able to register and unregister themselfs as remote
observers of this counter.
Next ObservedCounterImpl
extends CounterImpl
to be remote
counter and overides setValue
method to notify all observers about
counter value change by invoking notifyObservers
method
of b.util.rmi.RemotelyObservable
class. An instance of this class
then call update
method to all of its observers.
Thus ObserverClient
has to implement
b.util.rmi.RemoteObserver
interface.

(c) 1997 by Josef Vosyka.
Any questions or comments send to josef.vosyka@vsb.cz.