Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/test/java/rmi/activation/Activatable/restartCrashedService/RestartCrashedService_Stub.java
38829 views
/*1* Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/2223// Stub class generated by rmic, do not edit.24// Contents subject to change without notice.2526public final class RestartCrashedService_Stub27extends java.rmi.server.RemoteStub28implements ActivateMe29{30private static final java.rmi.server.Operation[] operations = {31new java.rmi.server.Operation("void crash()"),32new java.rmi.server.Operation("ActivateMe getUnicastVersion()"),33new java.rmi.server.Operation("void ping(java.lang.String)")34};3536private static final long interfaceHash = -5511576339806675599L;3738private static final long serialVersionUID = 2;3940private static boolean useNewInvoke;41private static java.lang.reflect.Method $method_crash_0;42private static java.lang.reflect.Method $method_getUnicastVersion_1;43private static java.lang.reflect.Method $method_ping_2;4445static {46try {47java.rmi.server.RemoteRef.class.getMethod("invoke",48new java.lang.Class[] {49java.rmi.Remote.class,50java.lang.reflect.Method.class,51java.lang.Object[].class,52long.class53});54useNewInvoke = true;55$method_crash_0 = ActivateMe.class.getMethod("crash", new java.lang.Class[] {});56$method_getUnicastVersion_1 = ActivateMe.class.getMethod("getUnicastVersion", new java.lang.Class[] {});57$method_ping_2 = ActivateMe.class.getMethod("ping", new java.lang.Class[] {java.lang.String.class});58} catch (java.lang.NoSuchMethodException e) {59useNewInvoke = false;60}61}6263// constructors64public RestartCrashedService_Stub() {65super();66}67public RestartCrashedService_Stub(java.rmi.server.RemoteRef ref) {68super(ref);69}7071// methods from remote interfaces7273// implementation of crash()74public void crash()75throws java.lang.Exception76{77if (useNewInvoke) {78ref.invoke(this, $method_crash_0, null, 8484760490859430950L);79} else {80java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);81ref.invoke(call);82ref.done(call);83}84}8586// implementation of getUnicastVersion()87public ActivateMe getUnicastVersion()88throws java.rmi.RemoteException89{90try {91if (useNewInvoke) {92Object $result = ref.invoke(this, $method_getUnicastVersion_1, null, -4366214672304578894L);93return ((ActivateMe) $result);94} else {95java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);96ref.invoke(call);97ActivateMe $result;98try {99java.io.ObjectInput in = call.getInputStream();100$result = (ActivateMe) in.readObject();101} catch (java.io.IOException e) {102throw new java.rmi.UnmarshalException("error unmarshalling return", e);103} catch (java.lang.ClassNotFoundException e) {104throw new java.rmi.UnmarshalException("error unmarshalling return", e);105} finally {106ref.done(call);107}108return $result;109}110} catch (java.lang.RuntimeException e) {111throw e;112} catch (java.rmi.RemoteException e) {113throw e;114} catch (java.lang.Exception e) {115throw new java.rmi.UnexpectedException("undeclared checked exception", e);116}117}118119// implementation of ping(String)120public void ping(java.lang.String $param_String_1)121throws java.rmi.RemoteException122{123try {124if (useNewInvoke) {125ref.invoke(this, $method_ping_2, new java.lang.Object[] {$param_String_1}, 8618968970901024056L);126} else {127java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 2, interfaceHash);128try {129java.io.ObjectOutput out = call.getOutputStream();130out.writeObject($param_String_1);131} catch (java.io.IOException e) {132throw new java.rmi.MarshalException("error marshalling arguments", e);133}134ref.invoke(call);135ref.done(call);136}137} catch (java.lang.RuntimeException e) {138throw e;139} catch (java.rmi.RemoteException e) {140throw e;141} catch (java.lang.Exception e) {142throw new java.rmi.UnexpectedException("undeclared checked exception", e);143}144}145}146147148