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// Skeleton class generated by rmic, do not edit.
25// Contents subject to change without notice.
26
27public final class UseCustomRef_Skel
28    implements java.rmi.server.Skeleton
29{
30    private static final java.rmi.server.Operation[] operations = {
31        new java.rmi.server.Operation("void ping()"),
32        new java.rmi.server.Operation("void receiveAndPing(Ping)")
33    };
34
35    private static final long interfaceHash = 8457085322718440165L;
36
37    public java.rmi.server.Operation[] getOperations() {
38        return (java.rmi.server.Operation[]) operations.clone();
39    }
40
41    public void dispatch(java.rmi.Remote obj, java.rmi.server.RemoteCall call, int opnum, long hash)
42        throws java.lang.Exception
43    {
44        if (opnum < 0) {
45            if (hash == 5866401369815527589L) {
46                opnum = 0;
47            } else if (hash == -5964458762870933304L) {
48                opnum = 1;
49            } else {
50                throw new java.rmi.UnmarshalException("invalid method hash");
51            }
52        } else {
53            if (hash != interfaceHash)
54                throw new java.rmi.server.SkeletonMismatchException("interface hash mismatch");
55        }
56
57        UseCustomRef server = (UseCustomRef) obj;
58        switch (opnum) {
59        case 0: // ping()
60        {
61            call.releaseInputStream();
62            server.ping();
63            try {
64                call.getResultStream(true);
65            } catch (java.io.IOException e) {
66                throw new java.rmi.MarshalException("error marshalling return", e);
67            }
68            break;
69        }
70
71        case 1: // receiveAndPing(Ping)
72        {
73            Ping $param_Ping_1;
74            try {
75                java.io.ObjectInput in = call.getInputStream();
76                $param_Ping_1 = (Ping) in.readObject();
77            } catch (java.io.IOException e) {
78                throw new java.rmi.UnmarshalException("error unmarshalling arguments", e);
79            } catch (java.lang.ClassNotFoundException e) {
80                throw new java.rmi.UnmarshalException("error unmarshalling arguments", e);
81            } finally {
82                call.releaseInputStream();
83            }
84            server.receiveAndPing($param_Ping_1);
85            try {
86                call.getResultStream(true);
87            } catch (java.io.IOException e) {
88                throw new java.rmi.MarshalException("error marshalling return", e);
89            }
90            break;
91        }
92
93        default:
94            throw new java.rmi.UnmarshalException("invalid method number");
95        }
96    }
97}
98