Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/test/java/rmi/activation/ActivationSystem/stubClassesPermitted/StubClassesPermitted_Stub.java
38889 views
/*1* Copyright (c) 1999, 2008, 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 StubClassesPermitted_Stub27extends java.rmi.server.RemoteStub28implements CanCreateStubs, java.rmi.Remote29{30private static final java.rmi.server.Operation[] operations = {31new java.rmi.server.Operation("java.lang.Object getForbiddenClass()"),32new java.rmi.server.Operation("java.rmi.registry.Registry getRegistry()"),33new java.rmi.server.Operation("java.rmi.activation.ActivationGroupID returnGroupID()"),34new java.rmi.server.Operation("void shutdown()")35};3637private static final long interfaceHash = 1677779850431817575L;3839private static final long serialVersionUID = 2;4041private static boolean useNewInvoke;42private static java.lang.reflect.Method $method_getForbiddenClass_0;43private static java.lang.reflect.Method $method_getRegistry_1;44private static java.lang.reflect.Method $method_returnGroupID_2;45private static java.lang.reflect.Method $method_shutdown_3;4647static {48try {49java.rmi.server.RemoteRef.class.getMethod("invoke",50new java.lang.Class[] {51java.rmi.Remote.class,52java.lang.reflect.Method.class,53java.lang.Object[].class,54long.class55});56useNewInvoke = true;57$method_getForbiddenClass_0 = CanCreateStubs.class.getMethod("getForbiddenClass", new java.lang.Class[] {});58$method_getRegistry_1 = CanCreateStubs.class.getMethod("getRegistry", new java.lang.Class[] {});59$method_returnGroupID_2 = CanCreateStubs.class.getMethod("returnGroupID", new java.lang.Class[] {});60$method_shutdown_3 = CanCreateStubs.class.getMethod("shutdown", new java.lang.Class[] {});61} catch (java.lang.NoSuchMethodException e) {62useNewInvoke = false;63}64}6566// constructors67public StubClassesPermitted_Stub() {68super();69}70public StubClassesPermitted_Stub(java.rmi.server.RemoteRef ref) {71super(ref);72}7374// methods from remote interfaces7576// implementation of getForbiddenClass()77public java.lang.Object getForbiddenClass()78throws java.lang.Exception79{80if (useNewInvoke) {81Object $result = ref.invoke(this, $method_getForbiddenClass_0, null, -658265783646674294L);82return ((java.lang.Object) $result);83} else {84java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);85ref.invoke(call);86java.lang.Object $result;87try {88java.io.ObjectInput in = call.getInputStream();89$result = (java.lang.Object) in.readObject();90} catch (java.io.IOException e) {91throw new java.rmi.UnmarshalException("error unmarshalling return", e);92} catch (java.lang.ClassNotFoundException e) {93throw new java.rmi.UnmarshalException("error unmarshalling return", e);94} finally {95ref.done(call);96}97return $result;98}99}100101// implementation of getRegistry()102public java.rmi.registry.Registry getRegistry()103throws java.rmi.RemoteException104{105try {106if (useNewInvoke) {107Object $result = ref.invoke(this, $method_getRegistry_1, null, 255311215504696981L);108return ((java.rmi.registry.Registry) $result);109} else {110java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);111ref.invoke(call);112java.rmi.registry.Registry $result;113try {114java.io.ObjectInput in = call.getInputStream();115$result = (java.rmi.registry.Registry) in.readObject();116} catch (java.io.IOException e) {117throw new java.rmi.UnmarshalException("error unmarshalling return", e);118} catch (java.lang.ClassNotFoundException e) {119throw new java.rmi.UnmarshalException("error unmarshalling return", e);120} finally {121ref.done(call);122}123return $result;124}125} catch (java.lang.RuntimeException e) {126throw e;127} catch (java.rmi.RemoteException e) {128throw e;129} catch (java.lang.Exception e) {130throw new java.rmi.UnexpectedException("undeclared checked exception", e);131}132}133134// implementation of returnGroupID()135public java.rmi.activation.ActivationGroupID returnGroupID()136throws java.rmi.RemoteException137{138try {139if (useNewInvoke) {140Object $result = ref.invoke(this, $method_returnGroupID_2, null, 6267304638191237098L);141return ((java.rmi.activation.ActivationGroupID) $result);142} else {143java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 2, interfaceHash);144ref.invoke(call);145java.rmi.activation.ActivationGroupID $result;146try {147java.io.ObjectInput in = call.getInputStream();148$result = (java.rmi.activation.ActivationGroupID) in.readObject();149} catch (java.io.IOException e) {150throw new java.rmi.UnmarshalException("error unmarshalling return", e);151} catch (java.lang.ClassNotFoundException e) {152throw new java.rmi.UnmarshalException("error unmarshalling return", e);153} finally {154ref.done(call);155}156return $result;157}158} catch (java.lang.RuntimeException e) {159throw e;160} catch (java.rmi.RemoteException e) {161throw e;162} catch (java.lang.Exception e) {163throw new java.rmi.UnexpectedException("undeclared checked exception", e);164}165}166167// implementation of shutdown()168public void shutdown()169throws java.lang.Exception170{171if (useNewInvoke) {172ref.invoke(this, $method_shutdown_3, null, -7207851917985848402L);173} else {174java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 3, interfaceHash);175ref.invoke(call);176ref.done(call);177}178}179}180181182