KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jacorb > test > orb > policies > SyncScopeServerImpl


1
2 package org.jacorb.test.orb.policies;
3
4 import org.jacorb.test.*;
5
6 public class SyncScopeServerImpl extends SyncScopeServerPOA
7 {
8
9     public void oneway_op(int delay)
10     {
11         synchronized (this)
12         {
13             try
14             {
15                 if (delay > 0) this.wait (delay);
16             }
17             catch (InterruptedException JavaDoc ex)
18             {
19                 System.out.println ("wait interrupted");
20             }
21         }
22     }
23
24     public void operation(int delay)
25     {
26         synchronized (this)
27         {
28             try
29             {
30                 if (delay > 0) this.wait (delay);
31             }
32             catch (InterruptedException JavaDoc ex)
33             {
34                 System.out.println ("wait interrupted");
35             }
36         }
37     }
38
39 }
40
Popular Tags