KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > proactive > core > group > MethodCallControlForGroup


1 /*
2 * ################################################################
3 *
4 * ProActive: The Java(TM) library for Parallel, Distributed,
5 * Concurrent computing with Security and Mobility
6 *
7 * Copyright (C) 1997-2002 INRIA/University of Nice-Sophia Antipolis
8 * Contact: proactive-support@inria.fr
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or any later version.
14 *
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
23 * USA
24 *
25 * Initial developer(s): The ProActive Team
26 * http://www.inria.fr/oasis/ProActive/contacts.html
27 * Contributor(s):
28 *
29 * ################################################################
30 */

31 package org.objectweb.proactive.core.group;
32
33 import java.io.IOException JavaDoc;
34 import java.lang.reflect.Method JavaDoc;
35
36 import org.objectweb.proactive.core.mop.MethodCall;
37
38 /**
39  * @author Laurent Baduel
40  */

41 public abstract class MethodCallControlForGroup extends MethodCall {
42
43     public MethodCallControlForGroup () { }
44
45     public Method JavaDoc getReifiedMethod () {
46         return null;
47     }
48
49     /**
50      * ControlCall for group never are asynchronous
51      * @return <code>false</code>
52      * @see org.objectweb.proactive.core.mop.MethodCall#isAsynchronousWayCall()
53      */

54     public boolean isAsynchronousWayCall() {
55         return false;
56     }
57
58     /**
59      * ControlCall for group always are oneway
60      * @return <code>true</code>
61      * @see org.objectweb.proactive.core.mop.MethodCall#isOneWayCall()
62      */

63     public boolean isOneWayCall() {
64         return true;
65     }
66
67     /**
68      * Returns the number of parmeters
69      * @return 0
70      * @see org.objectweb.proactive.core.mop.MethodCall#getNumberOfParameter()
71      */

72     public abstract int getNumberOfParameter();
73
74     //
75
// --- PRIVATE METHODS FOR SERIALIZATION --------------------------------------------------------------
76
//
77

78     private void writeObject(java.io.ObjectOutputStream JavaDoc out)
79         throws java.io.IOException JavaDoc {
80             this.writeTheObject(out);
81     }
82
83     protected void writeTheObject(java.io.ObjectOutputStream JavaDoc out)
84         throws java.io.IOException JavaDoc {
85         out.defaultWriteObject();
86         //System.out.println("L'appel de control est serialise");
87
}
88
89
90
91     private void readObject(java.io.ObjectInputStream JavaDoc in)
92         throws IOException JavaDoc, ClassNotFoundException JavaDoc {
93             this.readTheObject(in);
94     }
95
96     protected void readTheObject(java.io.ObjectInputStream JavaDoc in)
97         throws IOException JavaDoc, ClassNotFoundException JavaDoc {
98         in.defaultReadObject();
99         //System.out.println("L'appel de control est de-serialise");
100
}
101
102     // Overloaded to avoid this MethodCallControlForGroup object
103
// go inside the recycling pool of MethodCall.
104
protected void finalize () { }
105
106 }
107
Popular Tags