blob: 8e77ed15094c3259079a77adc40469a187d2b93e [file] [log] [blame]
J. Duke319a3b92007-12-01 00:00:00 +00001/*
2 * Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
20 * CA 95054 USA or visit www.sun.com if you need additional information or
21 * have any questions.
22 */
23
24// Stub class generated by rmic, do not edit.
25// Contents subject to change without notice.
26
27public final class Callback_Stub
28 extends java.rmi.server.RemoteStub
29 implements CallbackInterface, java.rmi.Remote
30{
31 private static final java.rmi.server.Operation[] operations = {
32 new java.rmi.server.Operation("int getNumDeactivated()"),
33 new java.rmi.server.Operation("void inc()")
34 };
35
36 private static final long interfaceHash = -1008194523112388035L;
37
38 private static final long serialVersionUID = 2;
39
40 private static boolean useNewInvoke;
41 private static java.lang.reflect.Method $method_getNumDeactivated_0;
42 private static java.lang.reflect.Method $method_inc_1;
43
44 static {
45 try {
46 java.rmi.server.RemoteRef.class.getMethod("invoke",
47 new java.lang.Class[] {
48 java.rmi.Remote.class,
49 java.lang.reflect.Method.class,
50 java.lang.Object[].class,
51 long.class
52 });
53 useNewInvoke = true;
54 $method_getNumDeactivated_0 = CallbackInterface.class.getMethod("getNumDeactivated", new java.lang.Class[] {});
55 $method_inc_1 = CallbackInterface.class.getMethod("inc", new java.lang.Class[] {});
56 } catch (java.lang.NoSuchMethodException e) {
57 useNewInvoke = false;
58 }
59 }
60
61 // constructors
62 public Callback_Stub() {
63 super();
64 }
65 public Callback_Stub(java.rmi.server.RemoteRef ref) {
66 super(ref);
67 }
68
69 // methods from remote interfaces
70
71 // implementation of getNumDeactivated()
72 public int getNumDeactivated()
73 throws java.rmi.RemoteException
74 {
75 try {
76 if (useNewInvoke) {
77 Object $result = ref.invoke(this, $method_getNumDeactivated_0, null, -761062487639949912L);
78 return ((java.lang.Integer) $result).intValue();
79 } else {
80 java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
81 ref.invoke(call);
82 int $result;
83 try {
84 java.io.ObjectInput in = call.getInputStream();
85 $result = in.readInt();
86 } catch (java.io.IOException e) {
87 throw new java.rmi.UnmarshalException("error unmarshalling return", e);
88 } finally {
89 ref.done(call);
90 }
91 return $result;
92 }
93 } catch (java.lang.RuntimeException e) {
94 throw e;
95 } catch (java.rmi.RemoteException e) {
96 throw e;
97 } catch (java.lang.Exception e) {
98 throw new java.rmi.UnexpectedException("undeclared checked exception", e);
99 }
100 }
101
102 // implementation of inc()
103 public void inc()
104 throws java.rmi.RemoteException
105 {
106 try {
107 if (useNewInvoke) {
108 ref.invoke(this, $method_inc_1, null, 4394985085384332959L);
109 } else {
110 java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
111 ref.invoke(call);
112 ref.done(call);
113 }
114 } catch (java.lang.RuntimeException e) {
115 throw e;
116 } catch (java.rmi.RemoteException e) {
117 throw e;
118 } catch (java.lang.Exception e) {
119 throw new java.rmi.UnexpectedException("undeclared checked exception", e);
120 }
121 }
122}