Interfaces and monitors

Visual LANSA

Interfaces and monitors

Three new interfaces have been defined to support the new visualizations.  An interface can be thought of as a contract between two objects.  The object that implements the interface "promises" to provide the functionality as specified in the interface definition.  By doing so, the object communicating with it can see that the interface has been implemented and thus "knows" that certain methods can be called.  LANSA does not check to ensure that methods are redefined by the implementer.  An error will occur at runtime if the required methods are called but have not been redefined.

Unlike inheritance, a component can implement more than interface, allowing it to support multiple behaviors depending on requirements.

To use an interface, add *Implements and the name of the interfaces as shown following:

Begin_Com Role(*Extends #Prim_panl *implements #Prim_dc.iMonitorSubject)

  

Ý 3.6.13 Dynamic Visualizations