Research Article
Models and Frameworks: A Synergistic Association for Developing Component-Based Applications
Algorithm 4
Skeleton of the OSGi implementation of the example shown in Figure
4 (implementation of component
C_Simulator).
(1) public class C_Simulator { | (2) private I_Collision portCollision; | (3) public C_Simulator () {−−} | (4) public void run() { | (5) // initialization code | (6) double distance; | (7) Point p1, p2; | (8) while (true ) { | (9) // perform computation | (10) distance = portCollision.margin (p1, p2); | (11) // perform computation with “distance” | (12) } | (13) } | (14) } |
|