< prev index next >

src/java.rmi/share/classes/sun/rmi/registry/RegistryImpl_Skel.java

Print this page


   1 /*
   2  * Copyright (c) 2017, 2019, 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


  41  */
  42 @SuppressWarnings({"deprecation", "serial"})
  43 public final class RegistryImpl_Skel
  44         implements java.rmi.server.Skeleton {
  45     private static final java.rmi.server.Operation[] operations = {
  46             new java.rmi.server.Operation("void bind(java.lang.String, java.rmi.Remote)"),
  47             new java.rmi.server.Operation("java.lang.String list()[]"),
  48             new java.rmi.server.Operation("java.rmi.Remote lookup(java.lang.String)"),
  49             new java.rmi.server.Operation("void rebind(java.lang.String, java.rmi.Remote)"),
  50             new java.rmi.server.Operation("void unbind(java.lang.String)")
  51     };
  52 
  53     private static final long interfaceHash = 4905912898345647071L;
  54 
  55     public java.rmi.server.Operation[] getOperations() {
  56         return operations.clone();
  57     }
  58 
  59     public void dispatch(java.rmi.Remote obj, java.rmi.server.RemoteCall call, int opnum, long hash)
  60             throws java.lang.Exception {
  61         if (opnum < 0) {
  62             if (hash == 7583982177005850366L) {
  63                 opnum = 0;
  64             } else if (hash == 2571371476350237748L) {
  65                 opnum = 1;
  66             } else if (hash == -7538657168040752697L) {
  67                 opnum = 2;
  68             } else if (hash == -8381844669958460146L) {
  69                 opnum = 3;
  70             } else if (hash == 7305022919901907578L) {
  71                 opnum = 4;
  72             } else {
  73                 throw new java.rmi.UnmarshalException("invalid method hash");
  74             }
  75         } else {
  76             if (hash != interfaceHash)
  77                 throw new java.rmi.server.SkeletonMismatchException("interface hash mismatch");
  78         }
  79 
  80         sun.rmi.registry.RegistryImpl server = (sun.rmi.registry.RegistryImpl) obj;
  81         switch (opnum) {
  82             case 0: // bind(String, Remote)
  83             {
  84                 // Check access before reading the arguments
  85                 RegistryImpl.checkAccess("Registry.bind");
  86 
  87                 java.lang.String $param_String_1;
  88                 java.rmi.Remote $param_Remote_2;
  89                 try {
  90                     java.io.ObjectInput in = call.getInputStream();
  91                     $param_String_1 = (java.lang.String) in.readObject();
  92                     $param_Remote_2 = (java.rmi.Remote) in.readObject();
  93                 } catch (java.io.IOException | java.lang.ClassNotFoundException e) {
  94                     throw new java.rmi.UnmarshalException("error unmarshalling arguments", e);
  95                 } finally {
  96                     call.releaseInputStream();
  97                 }
  98                 server.bind($param_String_1, $param_Remote_2);


   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


  41  */
  42 @SuppressWarnings({"deprecation", "serial"})
  43 public final class RegistryImpl_Skel
  44         implements java.rmi.server.Skeleton {
  45     private static final java.rmi.server.Operation[] operations = {
  46             new java.rmi.server.Operation("void bind(java.lang.String, java.rmi.Remote)"),
  47             new java.rmi.server.Operation("java.lang.String list()[]"),
  48             new java.rmi.server.Operation("java.rmi.Remote lookup(java.lang.String)"),
  49             new java.rmi.server.Operation("void rebind(java.lang.String, java.rmi.Remote)"),
  50             new java.rmi.server.Operation("void unbind(java.lang.String)")
  51     };
  52 
  53     private static final long interfaceHash = 4905912898345647071L;
  54 
  55     public java.rmi.server.Operation[] getOperations() {
  56         return operations.clone();
  57     }
  58 
  59     public void dispatch(java.rmi.Remote obj, java.rmi.server.RemoteCall call, int opnum, long hash)
  60             throws java.lang.Exception {
  61         if (hash != interfaceHash)
  62             throw new java.rmi.server.SkeletonMismatchException("interface hash mismatch");
















  63 
  64         sun.rmi.registry.RegistryImpl server = (sun.rmi.registry.RegistryImpl) obj;
  65         switch (opnum) {
  66             case 0: // bind(String, Remote)
  67             {
  68                 // Check access before reading the arguments
  69                 RegistryImpl.checkAccess("Registry.bind");
  70 
  71                 java.lang.String $param_String_1;
  72                 java.rmi.Remote $param_Remote_2;
  73                 try {
  74                     java.io.ObjectInput in = call.getInputStream();
  75                     $param_String_1 = (java.lang.String) in.readObject();
  76                     $param_Remote_2 = (java.rmi.Remote) in.readObject();
  77                 } catch (java.io.IOException | java.lang.ClassNotFoundException e) {
  78                     throw new java.rmi.UnmarshalException("error unmarshalling arguments", e);
  79                 } finally {
  80                     call.releaseInputStream();
  81                 }
  82                 server.bind($param_String_1, $param_Remote_2);


< prev index next >