01: package demo.arrays;
02:
03: import demo.arrays.MyServerPackage.*;
04:
05: class serverImpl extends MyServerPOA {
06:
07: public void _notify(MyServer[] s) {
08: int[] j = new int[] { 1, 2, 3 };
09: for (int i = 0; i < s.length; i++)
10: s[i].write("Notification # " + i, j);
11: }
12:
13: public void notify2(MyServer[] s) {
14: int[] j = new int[] { 26, 19 };
15: for (int i = 0; i < s.length; i++)
16: s[i].write2("Another Notification", j);
17: }
18:
19: public void notify3(demo.arrays.MyServerPackage.arrayContainer ac) {
20: int[] j = new int[2];
21: for (int i = 0; i < ac.shorty.length; i++)
22: System.out.println("notify3, ac[" + i + "][0]: "
23: + ac.shorty[i][0]);
24: }
25:
26: public int[] write(String s, int[] j) {
27: int[] a = new int[] { 42, 34, 13 };
28: java.lang.System.out.println("write: " + s + " size: "
29: + j.length);
30: return a;
31: }
32:
33: public int[] write2(String s, int[] j) {
34: int[] a = new int[] { 665 };
35:
36: System.out.println("write2: " + s + " size: " + j.length);
37: for (int i = 0; i < j.length; i++)
38: System.out.println("[" + i + "]: " + j[i]);
39: return a;
40: }
41:
42: public void printLongArray(long[] refs) {
43: System.out
44: .println("Taille du tableau de long : " + refs.length);
45: for (int i = 0; i < refs.length; i++)
46: System.out.println("refs[" + i + "] = " + refs[i]);
47: }
48:
49: public void printDoubleArray(double[] refs) {
50: System.out.println("Taille du tableau de doble : "
51: + refs.length);
52: for (int i = 0; i < refs.length; i++)
53: System.out.println("refs[" + i + "] = " + refs[i]);
54: }
55:
56: }
|