ReferenceRegistryStub.java revision 169
169N/A/*
0N/A * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
0N/A * published by the Free Software Foundation.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
0N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
0N/A * CA 95054 USA or visit www.sun.com if you need additional information or
0N/A * have any questions.
0N/A */
0N/A
0N/Apublic final class ReferenceRegistryStub
0N/A extends java.rmi.server.RemoteStub
0N/A implements java.rmi.registry.Registry, java.rmi.Remote
0N/A{
0N/A private static final java.rmi.server.Operation[] operations = {
169N/A new java.rmi.server.Operation("void bind(java.lang.String, java.rmi.Remote)"),
169N/A new java.rmi.server.Operation("java.lang.String list()[]"),
169N/A new java.rmi.server.Operation("java.rmi.Remote lookup(java.lang.String)"),
169N/A new java.rmi.server.Operation("void rebind(java.lang.String, java.rmi.Remote)"),
169N/A new java.rmi.server.Operation("void unbind(java.lang.String)")
0N/A };
169N/A
0N/A private static final long interfaceHash = 4905912898345647071L;
169N/A
0N/A // constructors
0N/A public ReferenceRegistryStub() {
169N/A super();
0N/A }
0N/A public ReferenceRegistryStub(java.rmi.server.RemoteRef ref) {
169N/A super(ref);
0N/A }
169N/A
0N/A // methods from remote interfaces
169N/A
0N/A // implementation of bind(String, Remote)
0N/A public void bind(java.lang.String $param_String_1, java.rmi.Remote $param_Remote_2)
169N/A throws java.rmi.AccessException, java.rmi.AlreadyBoundException, java.rmi.RemoteException
0N/A {
169N/A try {
169N/A java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
169N/A try {
169N/A java.io.ObjectOutput out = call.getOutputStream();
169N/A out.writeObject($param_String_1);
169N/A out.writeObject($param_Remote_2);
169N/A } catch (java.io.IOException e) {
169N/A throw new java.rmi.MarshalException("error marshalling arguments", e);
169N/A }
169N/A ref.invoke(call);
169N/A ref.done(call);
169N/A } catch (java.lang.RuntimeException e) {
169N/A throw e;
169N/A } catch (java.rmi.RemoteException e) {
169N/A throw e;
169N/A } catch (java.rmi.AlreadyBoundException e) {
169N/A throw e;
169N/A } catch (java.lang.Exception e) {
169N/A throw new java.rmi.UnexpectedException("undeclared checked exception", e);
169N/A }
0N/A }
169N/A
0N/A // implementation of list()
0N/A public java.lang.String[] list()
169N/A throws java.rmi.AccessException, java.rmi.RemoteException
0N/A {
169N/A try {
169N/A java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
169N/A ref.invoke(call);
169N/A java.lang.String[] $result;
169N/A try {
169N/A java.io.ObjectInput in = call.getInputStream();
169N/A $result = (java.lang.String[]) in.readObject();
169N/A } catch (java.io.IOException e) {
169N/A throw new java.rmi.UnmarshalException("error unmarshalling return", e);
169N/A } catch (java.lang.ClassNotFoundException e) {
169N/A throw new java.rmi.UnmarshalException("error unmarshalling return", e);
169N/A } finally {
169N/A ref.done(call);
169N/A }
169N/A return $result;
169N/A } catch (java.lang.RuntimeException e) {
169N/A throw e;
169N/A } catch (java.rmi.RemoteException e) {
169N/A throw e;
169N/A } catch (java.lang.Exception e) {
169N/A throw new java.rmi.UnexpectedException("undeclared checked exception", e);
169N/A }
0N/A }
169N/A
0N/A // implementation of lookup(String)
0N/A public java.rmi.Remote lookup(java.lang.String $param_String_1)
169N/A throws java.rmi.AccessException, java.rmi.NotBoundException, java.rmi.RemoteException
0N/A {
169N/A try {
169N/A java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 2, interfaceHash);
169N/A try {
169N/A java.io.ObjectOutput out = call.getOutputStream();
169N/A out.writeObject($param_String_1);
169N/A } catch (java.io.IOException e) {
169N/A throw new java.rmi.MarshalException("error marshalling arguments", e);
169N/A }
169N/A ref.invoke(call);
169N/A java.rmi.Remote $result;
169N/A try {
169N/A java.io.ObjectInput in = call.getInputStream();
169N/A $result = (java.rmi.Remote) in.readObject();
169N/A } catch (java.io.IOException e) {
169N/A throw new java.rmi.UnmarshalException("error unmarshalling return", e);
169N/A } catch (java.lang.ClassNotFoundException e) {
169N/A throw new java.rmi.UnmarshalException("error unmarshalling return", e);
169N/A } finally {
169N/A ref.done(call);
169N/A }
169N/A return $result;
169N/A } catch (java.lang.RuntimeException e) {
169N/A throw e;
169N/A } catch (java.rmi.RemoteException e) {
169N/A throw e;
169N/A } catch (java.rmi.NotBoundException e) {
169N/A throw e;
169N/A } catch (java.lang.Exception e) {
169N/A throw new java.rmi.UnexpectedException("undeclared checked exception", e);
169N/A }
0N/A }
169N/A
0N/A // implementation of rebind(String, Remote)
0N/A public void rebind(java.lang.String $param_String_1, java.rmi.Remote $param_Remote_2)
169N/A throws java.rmi.AccessException, java.rmi.RemoteException
0N/A {
169N/A try {
169N/A java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 3, interfaceHash);
169N/A try {
169N/A java.io.ObjectOutput out = call.getOutputStream();
169N/A out.writeObject($param_String_1);
169N/A out.writeObject($param_Remote_2);
169N/A } catch (java.io.IOException e) {
169N/A throw new java.rmi.MarshalException("error marshalling arguments", e);
169N/A }
169N/A ref.invoke(call);
169N/A ref.done(call);
169N/A } catch (java.lang.RuntimeException e) {
169N/A throw e;
169N/A } catch (java.rmi.RemoteException e) {
169N/A throw e;
169N/A } catch (java.lang.Exception e) {
169N/A throw new java.rmi.UnexpectedException("undeclared checked exception", e);
169N/A }
0N/A }
169N/A
0N/A // implementation of unbind(String)
0N/A public void unbind(java.lang.String $param_String_1)
169N/A throws java.rmi.AccessException, java.rmi.NotBoundException, java.rmi.RemoteException
0N/A {
169N/A try {
169N/A java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 4, interfaceHash);
169N/A try {
169N/A java.io.ObjectOutput out = call.getOutputStream();
169N/A out.writeObject($param_String_1);
169N/A } catch (java.io.IOException e) {
169N/A throw new java.rmi.MarshalException("error marshalling arguments", e);
169N/A }
169N/A ref.invoke(call);
169N/A ref.done(call);
169N/A } catch (java.lang.RuntimeException e) {
169N/A throw e;
169N/A } catch (java.rmi.RemoteException e) {
169N/A throw e;
169N/A } catch (java.rmi.NotBoundException e) {
169N/A throw e;
169N/A } catch (java.lang.Exception e) {
169N/A throw new java.rmi.UnexpectedException("undeclared checked exception", e);
169N/A }
0N/A }
0N/A}