1/*
2 * Copyright (c) 1998, 1999, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24// Stub class generated by rmic, do not edit.
25// Contents subject to change without notice.
26
27public final class NestedActivate_Stub
28    extends java.rmi.server.RemoteStub
29    implements ActivateMe, java.rmi.Remote
30{
31    private static final java.rmi.server.Operation[] operations = {
32        new java.rmi.server.Operation("void ping()"),
33        new java.rmi.server.Operation("void shutdown()"),
34        new java.rmi.server.Operation("void unregister()")
35    };
36
37    private static final long interfaceHash = 4395146122524413703L;
38
39    private static final long serialVersionUID = 2;
40
41    private static boolean useNewInvoke;
42    private static java.lang.reflect.Method $method_ping_0;
43    private static java.lang.reflect.Method $method_shutdown_1;
44    private static java.lang.reflect.Method $method_unregister_2;
45
46    static {
47        try {
48            java.rmi.server.RemoteRef.class.getMethod("invoke",
49                new java.lang.Class[] {
50                    java.rmi.Remote.class,
51                    java.lang.reflect.Method.class,
52                    java.lang.Object[].class,
53                    long.class
54                });
55            useNewInvoke = true;
56            $method_ping_0 = ActivateMe.class.getMethod("ping", new java.lang.Class[] {});
57            $method_shutdown_1 = ActivateMe.class.getMethod("shutdown", new java.lang.Class[] {});
58            $method_unregister_2 = ActivateMe.class.getMethod("unregister", new java.lang.Class[] {});
59        } catch (java.lang.NoSuchMethodException e) {
60            useNewInvoke = false;
61        }
62    }
63
64    // constructors
65    public NestedActivate_Stub() {
66        super();
67    }
68    public NestedActivate_Stub(java.rmi.server.RemoteRef ref) {
69        super(ref);
70    }
71
72    // methods from remote interfaces
73
74    // implementation of ping()
75    public void ping()
76        throws java.rmi.RemoteException
77    {
78        try {
79            if (useNewInvoke) {
80                ref.invoke(this, $method_ping_0, null, 5866401369815527589L);
81            } else {
82                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
83                ref.invoke(call);
84                ref.done(call);
85            }
86        } catch (java.lang.RuntimeException e) {
87            throw e;
88        } catch (java.rmi.RemoteException e) {
89            throw e;
90        } catch (java.lang.Exception e) {
91            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
92        }
93    }
94
95    // implementation of shutdown()
96    public void shutdown()
97        throws java.lang.Exception
98    {
99        if (useNewInvoke) {
100            ref.invoke(this, $method_shutdown_1, null, -7207851917985848402L);
101        } else {
102            java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
103            ref.invoke(call);
104            ref.done(call);
105        }
106    }
107
108    // implementation of unregister()
109    public void unregister()
110        throws java.lang.Exception
111    {
112        if (useNewInvoke) {
113            ref.invoke(this, $method_unregister_2, null, -5366864281862648102L);
114        } else {
115            java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 2, interfaceHash);
116            ref.invoke(call);
117            ref.done(call);
118        }
119    }
120}
121