001: /*
002: * RMI skeleton class
003: * for class org.apache.harmony.rmi.registry.RegistryImpl
004: * Compatible with stub protocol version 1.1/1.2
005: *
006: * Generated by DRL RMI Compiler (rmic).
007: *
008: * DO NOT EDIT!!!
009: * Contents subject to change without notice!
010: */
011: package org.apache.harmony.rmi.registry;
012:
013: import org.apache.harmony.rmi.internal.nls.Messages;
014:
015: public final class RegistryImpl_Skel implements
016: java.rmi.server.Skeleton {
017:
018: private static final long interfaceHash = 4905912898345647071L;
019:
020: private static final java.rmi.server.Operation[] operations = {
021: new java.rmi.server.Operation(
022: "void bind(java.lang.String, java.rmi.Remote)"), //$NON-NLS-1$
023: new java.rmi.server.Operation("java.lang.String list()[]"), //$NON-NLS-1$
024: new java.rmi.server.Operation(
025: "java.rmi.Remote lookup(java.lang.String)"), //$NON-NLS-1$
026: new java.rmi.server.Operation(
027: "void rebind(java.lang.String, java.rmi.Remote)"), //$NON-NLS-1$
028: new java.rmi.server.Operation(
029: "void unbind(java.lang.String)") //$NON-NLS-1$
030: };
031:
032: public java.rmi.server.Operation[] getOperations() {
033: return (java.rmi.server.Operation[]) operations.clone();
034: }
035:
036: public void dispatch(java.rmi.Remote obj,
037: java.rmi.server.RemoteCall call, int opnum, long hash)
038: throws java.lang.Exception {
039: if (opnum < 0) {
040: if (hash == 7583982177005850366L) {
041: opnum = 0;
042: } else if (hash == 2571371476350237748L) {
043: opnum = 1;
044: } else if (hash == -7538657168040752697L) {
045: opnum = 2;
046: } else if (hash == -8381844669958460146L) {
047: opnum = 3;
048: } else if (hash == 7305022919901907578L) {
049: opnum = 4;
050: } else {
051: throw new java.rmi.UnmarshalException(Messages
052: .getString("rmi.28", hash)); //$NON-NLS-1$
053: }
054: } else {
055: if (hash != interfaceHash) {
056: throw new java.rmi.server.SkeletonMismatchException(
057: Messages.getString(
058: "rmi.29", interfaceHash, hash)); //$NON-NLS-1$
059: }
060: }
061:
062: org.apache.harmony.rmi.registry.RegistryImpl server = (org.apache.harmony.rmi.registry.RegistryImpl) obj;
063:
064: switch (opnum) {
065:
066: case 0: { // bind(String, Remote)
067:
068: java.lang.String $param_String_1;
069: java.rmi.Remote $param_Remote_2;
070:
071: try {
072: java.io.ObjectInput in = call.getInputStream();
073: $param_String_1 = (java.lang.String) in.readObject();
074: $param_Remote_2 = (java.rmi.Remote) in.readObject();
075: } catch (java.io.IOException e) {
076: throw new java.rmi.UnmarshalException(Messages
077: .getString("rmi.2C"), e); //$NON-NLS-1$
078: } catch (java.lang.ClassNotFoundException e) {
079: throw new java.rmi.UnmarshalException(Messages
080: .getString("rmi.2C"), e); //$NON-NLS-1$
081: } finally {
082: call.releaseInputStream();
083: }
084:
085: server.bind($param_String_1, $param_Remote_2);
086:
087: try {
088: call.getResultStream(true);
089: } catch (java.io.IOException e) {
090: throw new java.rmi.MarshalException(Messages
091: .getString("rmi.2A"), e); //$NON-NLS-1$
092: }
093:
094: break;
095: }
096:
097: case 1: { // list()
098:
099: call.releaseInputStream();
100:
101: java.lang.String[] $result = server.list();
102:
103: try {
104: java.io.ObjectOutput out = call.getResultStream(true);
105: out.writeObject($result);
106: } catch (java.io.IOException e) {
107: throw new java.rmi.MarshalException(Messages
108: .getString("rmi.2A"), e); //$NON-NLS-1$
109: }
110:
111: break;
112: }
113:
114: case 2: { // lookup(String)
115:
116: java.lang.String $param_String_1;
117:
118: try {
119: java.io.ObjectInput in = call.getInputStream();
120: $param_String_1 = (java.lang.String) in.readObject();
121: } catch (java.io.IOException e) {
122: throw new java.rmi.UnmarshalException(Messages
123: .getString("rmi.2C"), e); //$NON-NLS-1$
124: } catch (java.lang.ClassNotFoundException e) {
125: throw new java.rmi.UnmarshalException(Messages
126: .getString("rmi.2C"), e); //$NON-NLS-1$
127: } finally {
128: call.releaseInputStream();
129: }
130:
131: java.rmi.Remote $result = server.lookup($param_String_1);
132:
133: try {
134: java.io.ObjectOutput out = call.getResultStream(true);
135: out.writeObject($result);
136: } catch (java.io.IOException e) {
137: throw new java.rmi.MarshalException(Messages
138: .getString("rmi.2A"), e); //$NON-NLS-1$
139: }
140:
141: break;
142: }
143:
144: case 3: { // rebind(String, Remote)
145:
146: java.lang.String $param_String_1;
147: java.rmi.Remote $param_Remote_2;
148:
149: try {
150: java.io.ObjectInput in = call.getInputStream();
151: $param_String_1 = (java.lang.String) in.readObject();
152: $param_Remote_2 = (java.rmi.Remote) in.readObject();
153: } catch (java.io.IOException e) {
154: throw new java.rmi.UnmarshalException(Messages
155: .getString("rmi.2C"), e); //$NON-NLS-1$
156: } catch (java.lang.ClassNotFoundException e) {
157: throw new java.rmi.UnmarshalException(Messages
158: .getString("rmi.2C"), e); //$NON-NLS-1$
159: } finally {
160: call.releaseInputStream();
161: }
162:
163: server.rebind($param_String_1, $param_Remote_2);
164:
165: try {
166: call.getResultStream(true);
167: } catch (java.io.IOException e) {
168: throw new java.rmi.MarshalException(Messages
169: .getString("rmi.2A"), e); //$NON-NLS-1$
170: }
171:
172: break;
173: }
174:
175: case 4: { // unbind(String)
176:
177: java.lang.String $param_String_1;
178:
179: try {
180: java.io.ObjectInput in = call.getInputStream();
181: $param_String_1 = (java.lang.String) in.readObject();
182: } catch (java.io.IOException e) {
183: throw new java.rmi.UnmarshalException(Messages
184: .getString("rmi.2C"), e); //$NON-NLS-1$
185: } catch (java.lang.ClassNotFoundException e) {
186: throw new java.rmi.UnmarshalException(Messages
187: .getString("rmi.2C"), e); //$NON-NLS-1$
188: } finally {
189: call.releaseInputStream();
190: }
191:
192: server.unbind($param_String_1);
193:
194: try {
195: call.getResultStream(true);
196: } catch (java.io.IOException e) {
197: throw new java.rmi.MarshalException(Messages
198: .getString("rmi.2A"), e); //$NON-NLS-1$
199: }
200:
201: break;
202: }
203:
204: default:
205: throw new java.rmi.UnmarshalException(Messages.getString(
206: "rmi.2B", opnum)); //$NON-NLS-1$
207: }
208: }
209: }
|