THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block |
---|
public class Foo { FooService fs; private void start() { // Starting method //... fs.foo(); //... } protected void stop() { // Stopping method if(fs!=null) { fs.foo(); } } } |
For this class, we define the following component type:
...
Code Block |
---|
public class HelloRequesterImpl implements Runnable { final static int DELAY=10000; HelloService\[\] m_hello; // Service Dependency boolean end; public void run() { while (\!end) { try { synchronized (this) { { for(int i = 0; i < m_hello.length; i++) { System.out.println(m_hello\[i\].sayHello("Clement")); } } } } Thread.sleep(DELAY); } catch (InterruptedException ie) { /\* will recheck quit \*/ } } } } } } public void starting() { Thread T = new Thread(this); end = false; T.start(); } public void stopping() { end = true; } |
...