J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright 1998-1999 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 | |
| 27 | public final class RestartCrashedService_Stub |
| 28 | extends java.rmi.server.RemoteStub |
| 29 | implements ActivateMe |
| 30 | { |
| 31 | private static final java.rmi.server.Operation[] operations = { |
| 32 | new java.rmi.server.Operation("void crash()"), |
| 33 | new java.rmi.server.Operation("ActivateMe getUnicastVersion()"), |
| 34 | new java.rmi.server.Operation("void ping(java.lang.String)") |
| 35 | }; |
| 36 | |
| 37 | private static final long interfaceHash = -5511576339806675599L; |
| 38 | |
| 39 | private static final long serialVersionUID = 2; |
| 40 | |
| 41 | private static boolean useNewInvoke; |
| 42 | private static java.lang.reflect.Method $method_crash_0; |
| 43 | private static java.lang.reflect.Method $method_getUnicastVersion_1; |
| 44 | private static java.lang.reflect.Method $method_ping_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_crash_0 = ActivateMe.class.getMethod("crash", new java.lang.Class[] {}); |
| 57 | $method_getUnicastVersion_1 = ActivateMe.class.getMethod("getUnicastVersion", new java.lang.Class[] {}); |
| 58 | $method_ping_2 = ActivateMe.class.getMethod("ping", new java.lang.Class[] {java.lang.String.class}); |
| 59 | } catch (java.lang.NoSuchMethodException e) { |
| 60 | useNewInvoke = false; |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | // constructors |
| 65 | public RestartCrashedService_Stub() { |
| 66 | super(); |
| 67 | } |
| 68 | public RestartCrashedService_Stub(java.rmi.server.RemoteRef ref) { |
| 69 | super(ref); |
| 70 | } |
| 71 | |
| 72 | // methods from remote interfaces |
| 73 | |
| 74 | // implementation of crash() |
| 75 | public void crash() |
| 76 | throws java.lang.Exception |
| 77 | { |
| 78 | if (useNewInvoke) { |
| 79 | ref.invoke(this, $method_crash_0, null, 8484760490859430950L); |
| 80 | } else { |
| 81 | java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash); |
| 82 | ref.invoke(call); |
| 83 | ref.done(call); |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | // implementation of getUnicastVersion() |
| 88 | public ActivateMe getUnicastVersion() |
| 89 | throws java.rmi.RemoteException |
| 90 | { |
| 91 | try { |
| 92 | if (useNewInvoke) { |
| 93 | Object $result = ref.invoke(this, $method_getUnicastVersion_1, null, -4366214672304578894L); |
| 94 | return ((ActivateMe) $result); |
| 95 | } else { |
| 96 | java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash); |
| 97 | ref.invoke(call); |
| 98 | ActivateMe $result; |
| 99 | try { |
| 100 | java.io.ObjectInput in = call.getInputStream(); |
| 101 | $result = (ActivateMe) in.readObject(); |
| 102 | } catch (java.io.IOException e) { |
| 103 | throw new java.rmi.UnmarshalException("error unmarshalling return", e); |
| 104 | } catch (java.lang.ClassNotFoundException e) { |
| 105 | throw new java.rmi.UnmarshalException("error unmarshalling return", e); |
| 106 | } finally { |
| 107 | ref.done(call); |
| 108 | } |
| 109 | return $result; |
| 110 | } |
| 111 | } catch (java.lang.RuntimeException e) { |
| 112 | throw e; |
| 113 | } catch (java.rmi.RemoteException e) { |
| 114 | throw e; |
| 115 | } catch (java.lang.Exception e) { |
| 116 | throw new java.rmi.UnexpectedException("undeclared checked exception", e); |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | // implementation of ping(String) |
| 121 | public void ping(java.lang.String $param_String_1) |
| 122 | throws java.rmi.RemoteException |
| 123 | { |
| 124 | try { |
| 125 | if (useNewInvoke) { |
| 126 | ref.invoke(this, $method_ping_2, new java.lang.Object[] {$param_String_1}, 8618968970901024056L); |
| 127 | } else { |
| 128 | java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 2, interfaceHash); |
| 129 | try { |
| 130 | java.io.ObjectOutput out = call.getOutputStream(); |
| 131 | out.writeObject($param_String_1); |
| 132 | } catch (java.io.IOException e) { |
| 133 | throw new java.rmi.MarshalException("error marshalling arguments", e); |
| 134 | } |
| 135 | ref.invoke(call); |
| 136 | ref.done(call); |
| 137 | } |
| 138 | } catch (java.lang.RuntimeException e) { |
| 139 | throw e; |
| 140 | } catch (java.rmi.RemoteException e) { |
| 141 | throw e; |
| 142 | } catch (java.lang.Exception e) { |
| 143 | throw new java.rmi.UnexpectedException("undeclared checked exception", e); |
| 144 | } |
| 145 | } |
| 146 | } |