1/* 2 * Copyright (c) 2017, 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. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26package sun.rmi.transport; 27 28/** 29 * Skeleton to dispatch DGC methods. 30 * Originally generated by RMIC but frozen to match the stubs. 31 */ 32@SuppressWarnings({"deprecation", "serial"}) 33public final class DGCImpl_Skel 34 implements java.rmi.server.Skeleton { 35 private static final java.rmi.server.Operation[] operations = { 36 new java.rmi.server.Operation("void clean(java.rmi.server.ObjID[], long, java.rmi.dgc.VMID, boolean)"), 37 new java.rmi.server.Operation("java.rmi.dgc.Lease dirty(java.rmi.server.ObjID[], long, java.rmi.dgc.Lease)") 38 }; 39 40 private static final long interfaceHash = -669196253586618813L; 41 42 public java.rmi.server.Operation[] getOperations() { 43 return operations.clone(); 44 } 45 46 public void dispatch(java.rmi.Remote obj, java.rmi.server.RemoteCall call, int opnum, long hash) 47 throws java.lang.Exception { 48 if (hash != interfaceHash) 49 throw new java.rmi.server.SkeletonMismatchException("interface hash mismatch"); 50 51 sun.rmi.transport.DGCImpl server = (sun.rmi.transport.DGCImpl) obj; 52 switch (opnum) { 53 case 0: // clean(ObjID[], long, VMID, boolean) 54 { 55 java.rmi.server.ObjID[] $param_arrayOf_ObjID_1; 56 long $param_long_2; 57 java.rmi.dgc.VMID $param_VMID_3; 58 boolean $param_boolean_4; 59 try { 60 java.io.ObjectInput in = call.getInputStream(); 61 $param_arrayOf_ObjID_1 = (java.rmi.server.ObjID[]) in.readObject(); 62 $param_long_2 = in.readLong(); 63 $param_VMID_3 = (java.rmi.dgc.VMID) in.readObject(); 64 $param_boolean_4 = in.readBoolean(); 65 } catch (java.io.IOException e) { 66 throw new java.rmi.UnmarshalException("error unmarshalling arguments", e); 67 } catch (java.lang.ClassNotFoundException e) { 68 throw new java.rmi.UnmarshalException("error unmarshalling arguments", e); 69 } finally { 70 call.releaseInputStream(); 71 } 72 server.clean($param_arrayOf_ObjID_1, $param_long_2, $param_VMID_3, $param_boolean_4); 73 try { 74 call.getResultStream(true); 75 } catch (java.io.IOException e) { 76 throw new java.rmi.MarshalException("error marshalling return", e); 77 } 78 break; 79 } 80 81 case 1: // dirty(ObjID[], long, Lease) 82 { 83 java.rmi.server.ObjID[] $param_arrayOf_ObjID_1; 84 long $param_long_2; 85 java.rmi.dgc.Lease $param_Lease_3; 86 try { 87 java.io.ObjectInput in = call.getInputStream(); 88 $param_arrayOf_ObjID_1 = (java.rmi.server.ObjID[]) in.readObject(); 89 $param_long_2 = in.readLong(); 90 $param_Lease_3 = (java.rmi.dgc.Lease) in.readObject(); 91 } catch (java.io.IOException e) { 92 throw new java.rmi.UnmarshalException("error unmarshalling arguments", e); 93 } catch (java.lang.ClassNotFoundException e) { 94 throw new java.rmi.UnmarshalException("error unmarshalling arguments", e); 95 } finally { 96 call.releaseInputStream(); 97 } 98 java.rmi.dgc.Lease $result = server.dirty($param_arrayOf_ObjID_1, $param_long_2, $param_Lease_3); 99 try { 100 java.io.ObjectOutput out = call.getResultStream(true); 101 out.writeObject($result); 102 } catch (java.io.IOException e) { 103 throw new java.rmi.MarshalException("error marshalling return", e); 104 } 105 break; 106 } 107 108 default: 109 throw new java.rmi.UnmarshalException("invalid method number"); 110 } 111 } 112} 113