Creating the CORBA IObserver interface

About this task

In order to make all these elements work together, the Act operation is inherited by the observers from the CORBA IObserver interface. When the Act operation is called for Alarm Observers, the alarm is activated.

To incorporate these concepts into the model:

Procedure

  1. Above the two observer classes, draw another class and change the generated name to be IObserver.
  2. Right-click to display the Features window, on the General tab select CORBAInterface in the Stereotype field and Sequential in the Concurrency field.
  3. Click Apply to save the changes and keep the window open.
  4. Select the Operations tab, and add the PrimitiveOperation act in the same manner as used previously. Click OK.
  5. Right-click the new IObserver class and select the Display Options > Operations.
  6. Select the act operation to be displayed and click OK. The diagram now resembles the following example:
  7. Select the Inheritance button on the Drawing toolbar. Click the AlarmObserver and draw an inheritance line to the IObserver and click to end the line.
  8. Draw another inheritance line from policeObserver to the IObserver.
  9. Select the Directed Association button on the Drawing toolbar. Click the SDM class and then the IObserver class. Type the name itsObservers in the area highlighted on the line.
  10. Right-click the directed association line and select "*" for the Multiplicity in the window. Click OK.
  11. Draw another directed association from ISDM to IObserver without giving the line a name, but select "*" as the Multiplicty, as for the previous association. Your diagram now resembles the following example:

Feedback